From 8ce52006019d885427cc1fff8ddd1789c476d6da Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Wed, 28 Feb 2018 06:32:16 +0100 Subject: [PATCH] Some new msvc build rules. Not tested --- CMakeLists.txt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ece27a..79f59ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,8 +173,12 @@ if (NOT CMAKE_BUILD_TYPE MATCHES Debug) ) endif (NOT CMAKE_BUILD_TYPE MATCHES Debug) -if (WIN32) - set(DLL_FILES +SET(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE) +SET(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) +SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) +SET(CMAKE_INSTALL_MFC_LIBRARIES TRUE) +SET(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE) +SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${CMAKE_SOURCE_DIR}/bin/libFLAC-8.dll ${CMAKE_SOURCE_DIR}/bin/libfreetype-6.dll ${CMAKE_SOURCE_DIR}/bin/libmodplug-1.dll @@ -191,10 +195,9 @@ if (WIN32) ${CMAKE_SOURCE_DIR}/bin/ucrtbased.dll ${CMAKE_SOURCE_DIR}/bin/zlib1.dll ${CMAKE_SOURCE_DIR}/bin/vcruntime140d.dll - ) -endif (WIN32) - + ) include(InstallRequiredSystemLibraries) + INSTALL(TARGETS breakhack COMPONENT Release RUNTIME DESTINATION . @@ -203,12 +206,6 @@ INSTALL(FILES assets.pack data.pack COMPONENT Release DESTINATION . ) -if (WIN32) - INSTALL(FILES ${DLL_FILES} - COMPONENT Release - DESTINATION . - ) -endif (WIN32) set(CPACK_INSTALL_CMAKE_PROJECTS "${PROJECT_BINARY_DIR};breakhack;Release;.") set(CPACK_PACKAGE_NAME "BreakHack")