Commit 511422d7 authored by Ghislain MARY's avatar Ghislain MARY

Improve installation of Microsoft redistributable libraries (always install...

Improve installation of Microsoft redistributable libraries (always install release libraries even for debug builds).
parent 2e81f85d
......@@ -171,12 +171,14 @@ if(MSVC)
FILES_MATCHING PATTERN "libmswasapi.dll"
)
string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}")
find_file(MSVCP_LIB "msvcp${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32")
find_file(MSVCR_LIB "msvcr${MSVC_VERSION}0.dll" PATHS "C:/Windows/System32")
install(FILES ${MSVCP_LIB} ${MSVCR_LIB} DESTINATION "bin")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(MSVC_DEBUG_SYSTEM_LIBRARIES "d")
find_file(MSVCPD_LIB "msvcp${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32")
find_file(MSVCRD_LIB "msvcr${MSVC_VERSION}0d.dll" PATHS "C:/Windows/System32")
install(FILES ${MSVCPD_LIB} ${MSVCRD_LIB} DESTINATION "bin")
endif()
find_file(MSVCP_LIB "msvcp${MSVC_VERSION}0${MSVC_DEBUG_SYSTEM_LIBRARIES}.dll" PATHS "C:/Windows/System32")
find_file(MSVCR_LIB "msvcr${MSVC_VERSION}0${MSVC_DEBUG_SYSTEM_LIBRARIES}.dll" PATHS "C:/Windows/System32")
install(FILES ${MSVCP_LIB} ${MSVCR_LIB} DESTINATION "bin")
endif()
set(CPACK_PACKAGE_NAME "Linphone")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment