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")