diff options
author | Bastien Bouclet | 2018-03-20 19:29:45 +0100 |
---|---|---|
committer | Bastien Bouclet | 2018-03-20 19:36:44 +0100 |
commit | 728f4d4ba539310e49fb74385b8bdb18d4fcff26 (patch) | |
tree | 58885e627b4610ba70d7c7d19ce21076d5313fe7 | |
parent | 891d972a621679ea591a07c16e6bb85df97dec52 (diff) | |
download | scummvm-rg350-728f4d4ba539310e49fb74385b8bdb18d4fcff26.tar.gz scummvm-rg350-728f4d4ba539310e49fb74385b8bdb18d4fcff26.tar.bz2 scummvm-rg350-728f4d4ba539310e49fb74385b8bdb18d4fcff26.zip |
CREATE_PROJECT: Place libs requiring symbols before libs providing them
In the CMake generator. So the linker can resolve the symbols it marked
as unresolved as it walks the libraries.
Fixes building ResidualVM with msys2 from Qt Creator on Windows.
-rw-r--r-- | devtools/create_project/cmake.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp index 9be76f9fe8..2c4553a6c6 100644 --- a/devtools/create_project/cmake.cpp +++ b/devtools/create_project/cmake.cpp @@ -191,13 +191,16 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string addFilesToProject(moduleDir, project, includeList, excludeList, setup.filePrefix); - project << ")\n"; + project << ")\n\n"; if (name != setup.projectName) { project << "endif()\n"; } - project << "# Libraries\n"; if (name == setup.projectName) { + project << "# Engines libraries handling\n"; + writeEnginesLibrariesHandling(setup, project); + + project << "# Libraries\n"; const Library *sdlLibrary = getLibraryFromFeature("sdl", setup.useSDL2); project << "target_link_libraries(" << name << " ${" << sdlLibrary->librariesVar << "})\n"; @@ -219,9 +222,6 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string project << "endif()\n"; project << "\n"; - project << "# Engines libraries handling\n"; - writeEnginesLibrariesHandling(setup, project); - project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD 11)\n"; project << "set_property(TARGET " << name << " PROPERTY CXX_STANDARD_REQUIRED ON)\n"; } |