Ensure static linking for Windows builds.

This commit is contained in:
Deukhoofd 2019-12-07 22:12:29 +01:00
parent 7c642f7df5
commit ef28f9cd52
1 changed files with 5 additions and 5 deletions

View File

@ -39,12 +39,12 @@ target_link_libraries(CreatureLibTests CreatureLibLibrary)
target_link_libraries(CreatureLibTests CreatureLibBattling)
if (WINDOWS)
set(CMAKE_CXX_FLAGS "-m64 -Wa,-mbig-obj")
set(CMAKE_CXX_FLAGS "-m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition")
# Statically link libraries we need in Windows.
# target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++)
# target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++)
# target_link_libraries(CreatureLibBattling -static -static-libgcc -static-libstdc++)
# target_link_libraries(CreatureLibTests -static -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibCore -static -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibLibrary -static -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibBattling -static -static-libgcc -static-libstdc++)
target_link_libraries(CreatureLibTests -static -static-libgcc -static-libstdc++)
endif(WINDOWS)
# Add a definition for the test library