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.
This commit is contained in:
parent
891d972a62
commit
728f4d4ba5
1 changed files with 5 additions and 5 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue