diff --git a/CMakeLists.txt b/CMakeLists.txt index 49d3f731f..cea61ddbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,10 @@ include(ECMQtDeclareLoggingCategory) ####################################### Program Info ####################################### set(Launcher_APP_BINARY_NAME "prismlauncher" CACHE STRING "Name of the Launcher binary") +if(MSVC) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP true) + include(InstallRequiredSystemLibraries) +endif() add_subdirectory(program_info) ####################################### Install layout ####################################### @@ -373,8 +377,6 @@ if(NOT (UNIX AND APPLE)) # Install "portable.txt" if selected component is "portable" install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_Portable_File}" DESTINATION "." COMPONENT portable EXCLUDE_FROM_ALL) if (MSVC) - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP true) - include(InstallRequiredSystemLibraries) install(FILES "${MSVC_REDIST_DIR}/vc_redist.x64.exe" DESTINATION "vc_redist/." COMPONENT portable EXCLUDE_FROM_ALL ) endif() endif() diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt index 0ce559406..8a7d4868f 100644 --- a/program_info/CMakeLists.txt +++ b/program_info/CMakeLists.txt @@ -43,7 +43,6 @@ configure_file(prismlauncher.manifest.in prismlauncher.manifest @ONLY) configure_file(prismlauncher.ico prismlauncher.ico COPYONLY) if(MSVC) - set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP true) include(InstallRequiredSystemLibraries) file(TO_NATIVE_PATH ${MSVC_REDIST_DIR} Native_MSVC_REDIST_DIR) set(Launcher_MSVC_Redist_NSIS_Section "\