Skip to content

Commit

Permalink
CREATE_PROJECT: fixed missing defines
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Nov 7, 2020
1 parent dab2c09 commit 5f2c18f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions devtools/create_project/cmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,9 @@ void CMakeProvider::writeWarnings(std::ofstream &output) const {
}

void CMakeProvider::writeDefines(const BuildSetup &setup, std::ofstream &output) const {
output << "if (WIN32)\n";
output << " add_definitions(-DWIN32)\n";
output << "else()\n";
output << " add_definitions(-DPOSIX)\n";
output << "endif()\n";

output << "add_definitions(-DSDL_BACKEND)\n\n";
for (const std::string& define : setup.defines) {
output << "add_definitions(-D" << define << ")\n\n";
}
}

void CMakeProvider::writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
Expand Down

0 comments on commit 5f2c18f

Please sign in to comment.