|
@@ -47,22 +47,23 @@ cpack_add_component(Core DISPLAY_NAME "Plex Media Player" DESCRIPTION "Plex Medi
|
|
|
|
|
|
# borrowed from https://github.com/peersafe/PeerSafe/blob/master/cmake_modules/package.cmake
|
|
|
if(WIN32)
|
|
|
+ string(REPLACE "." "" VCVER $ENV{VisualStudioVersion})
|
|
|
if(MSVC)
|
|
|
if(CMAKE_CL_64)
|
|
|
- set(VC_RUNTIME_DIR "$ENV{VCInstallDir}/redist/x64/Microsoft.VC120.CRT")
|
|
|
+ set(VC_RUNTIME_DIR "$ENV{VCInstallDir}/redist/x64/Microsoft.VC${VCVER}.CRT")
|
|
|
else()
|
|
|
- set(VC_RUNTIME_DIR "$ENV{VCInstallDir}/redist/x86/Microsoft.VC120.CRT")
|
|
|
+ set(VC_RUNTIME_DIR "$ENV{VCInstallDir}/redist/x86/Microsoft.VC${VCVER}.CRT")
|
|
|
endif()
|
|
|
- find_file(MSVCP120 NAMES msvcp120.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
- find_file(MSVCR120 NAMES msvcr120.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
- find_file(VCCORLIB120 NAMES vccorlib120.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
- if(NOT MSVCP120)
|
|
|
- set(ERROR_MESSAGE "\nCould not find library msvcp120.dll.\nRun cmake from a Visual Studio Command Prompt.")
|
|
|
+ find_file(MSVCP NAMES msvcp${VCVER}.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
+ #find_file(MSVCR NAMES msvcr${VCVER}.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
+ find_file(VCCORLIB NAMES vccorlib${VCVER}.dll PATHS ${VC_RUNTIME_DIR} NO_DEFAULT_PATH)
|
|
|
+ if(NOT MSVCP)
|
|
|
+ set(ERROR_MESSAGE "\nCould not find library msvcp${VCVER}.dll.\nRun cmake from a Visual Studio Command Prompt.")
|
|
|
message(FATAL_ERROR "${ERROR_MESSAGE}")
|
|
|
endif()
|
|
|
endif()
|
|
|
|
|
|
- install(FILES ${MSVCP120} ${MSVCR120} ${VCCORLIB120} DESTINATION .)
|
|
|
+ install(FILES ${MSVCP} ${VCCORLIB} DESTINATION .)
|
|
|
endif()
|
|
|
|
|
|
if(WIN32 AND DEFINED DEPENDENCY_ROOT)
|