From 1861302dbd82ff674da0beacad76c44b21760c7b Mon Sep 17 00:00:00 2001 From: Phillip Andrews Date: Sun, 13 Nov 2016 14:27:59 -0600 Subject: [PATCH] Include various libraries for Visual Studio environment --- apps/essimporter/CMakeLists.txt | 4 ++++ apps/launcher/CMakeLists.txt | 4 ++++ apps/mwiniimporter/CMakeLists.txt | 4 ++++ apps/opencs/CMakeLists.txt | 9 +++++++++ apps/openmw/CMakeLists.txt | 2 ++ 5 files changed, 23 insertions(+) diff --git a/apps/essimporter/CMakeLists.txt b/apps/essimporter/CMakeLists.txt index 84e31dad9..5fe93bd3e 100644 --- a/apps/essimporter/CMakeLists.txt +++ b/apps/essimporter/CMakeLists.txt @@ -42,3 +42,7 @@ if (BUILD_WITH_CODE_COVERAGE) add_definitions (--coverage) target_link_libraries(openmw-essimporter gcov) endif() + +if (MSVC) + target_link_libraries(openmw-essimporter imm32.lib winmm.lib version.lib) +endif(MSVC) diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt index 207f6a84b..8bb55158e 100644 --- a/apps/launcher/CMakeLists.txt +++ b/apps/launcher/CMakeLists.txt @@ -92,6 +92,10 @@ target_link_libraries(openmw-launcher components ) +if(MSVC) + target_link_libraries(openmw-launcher imm32.lib winmm.lib version.lib) +endif(MSVC) + if (DESIRED_QT_VERSION MATCHES 4) target_link_libraries(openmw-launcher ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}) if(WIN32) diff --git a/apps/mwiniimporter/CMakeLists.txt b/apps/mwiniimporter/CMakeLists.txt index 4024c0b42..4c73a4c35 100644 --- a/apps/mwiniimporter/CMakeLists.txt +++ b/apps/mwiniimporter/CMakeLists.txt @@ -24,6 +24,10 @@ if (WIN32) ${Boost_LOCALE_LIBRARY}) endif() +if(MSVC) + target_link_libraries(openmw-iniimporter imm32.lib winmm.lib version.lib) +endif(MSVC) + if (MINGW) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode") endif() diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 1f572c3f8..c5f18656c 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -225,6 +225,15 @@ if (WIN32) target_link_libraries(openmw-cs ${Boost_LOCALE_LIBRARY}) endif() +if (MSVC) + # Debug version needs increased number of sections beyond 2^16 + if (CMAKE_CL_64) + set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj") + endif (CMAKE_CL_64) + add_definitions("-D_USE_MATH_DEFINES") + target_link_libraries(openmw-cs imm32.lib winmm.lib version.lib) +endif (MSVC) + if(APPLE) INSTALL(TARGETS openmw-cs BUNDLE DESTINATION OpenMW COMPONENT BUNDLE) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 277acea2d..e24c8ad94 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -201,4 +201,6 @@ if (MSVC) set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj") endif (CMAKE_CL_64) add_definitions("-D_USE_MATH_DEFINES") + target_link_libraries(openmw imm32.lib winmm.lib version.lib) endif (MSVC) +