diff options
Diffstat (limited to 'Modules/InstallRequiredSystemLibraries.cmake')
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 75 |
1 files changed, 63 insertions, 12 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 86033e6..5afb517 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -19,6 +19,8 @@ # libraries are installed when both debug and release are available. If # CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time libraries are # installed as well as the CRT run time libraries. If +# CMAKE_INSTALL_OPENMP_LIBRARIES is set then the OpenMP run time libraries +# are installed as well. If # CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are # installed to that directory rather than the default. If # CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this @@ -94,6 +96,8 @@ if(MSVC) "${MSVC80_CRT_DIR}/msvcp80.dll" "${MSVC80_CRT_DIR}/msvcr80.dll" ) + else() + set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) @@ -132,6 +136,8 @@ if(MSVC) "${MSVC90_CRT_DIR}/msvcp90.dll" "${MSVC90_CRT_DIR}/msvcr90.dll" ) + else() + set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) @@ -157,7 +163,8 @@ if(MSVC) "${msvc_install_dir}/../../VC/redist" "${base_dir}/VC/redist" "$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist" - "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio ${v}.0/VC/redist" + set(programfilesx86 "ProgramFiles(x86)") + "$ENV{${programfilesx86}}/Microsoft Visual Studio ${v}.0/VC/redist" ) mark_as_advanced(MSVC${v}_REDIST_DIR) set(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT") @@ -167,6 +174,8 @@ if(MSVC) "${MSVC${v}_CRT_DIR}/msvcp${v}0.dll" "${MSVC${v}_CRT_DIR}/msvcr${v}0.dll" ) + else() + set(__install__libs) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) @@ -191,6 +200,10 @@ if(MSVC) MSVCRT_FILES_FOR_VERSION(12) endif() + if(MSVC14) + MSVCRT_FILES_FOR_VERSION(14) + endif() + if(CMAKE_INSTALL_MFC_LIBRARIES) if(MSVC70) set(__install__libs ${__install__libs} @@ -360,6 +373,44 @@ if(MSVC) if(MSVC12) MFC_FILES_FOR_VERSION(12) endif() + + if(MSVC14) + MFC_FILES_FOR_VERSION(14) + endif() + endif() + + # MSVC 8 was the first version with OpenMP + # Furthermore, there is no debug version of this + if(CMAKE_INSTALL_OPENMP_LIBRARIES) + macro(OPENMP_FILES_FOR_VERSION version_a version_b) + set(va "${version_a}") + set(vb "${version_b}") + set(MSVC${va}_OPENMP_DIR "${MSVC${va}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${vb}.OPENMP") + + if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) + set(__install__libs ${__install__libs} + "${MSVC${va}_OPENMP_DIR}/vcomp${vb}.dll") + endif() + endmacro() + + if(MSVC80) + OPENMP_FILES_FOR_VERSION(80 80) + endif() + if(MSVC90) + OPENMP_FILES_FOR_VERSION(90 90) + endif() + if(MSVC10) + OPENMP_FILES_FOR_VERSION(10 100) + endif() + if(MSVC11) + OPENMP_FILES_FOR_VERSION(11 110) + endif() + if(MSVC12) + OPENMP_FILES_FOR_VERSION(12 120) + endif() + if(MSVC14) + OPENMP_FILES_FOR_VERSION(14 140) + endif() endif() foreach(lib @@ -383,18 +434,18 @@ endif() if(WATCOM) get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH ) - if(WATCOM17) - set( __install__libs ${CompilerPath}/clbr17.dll - ${CompilerPath}/mt7r17.dll ${CompilerPath}/plbr17.dll ) - endif() - if(WATCOM18) - set( __install__libs ${CompilerPath}/clbr18.dll - ${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll ) - endif() - if(WATCOM19) - set( __install__libs ${CompilerPath}/clbr19.dll - ${CompilerPath}/mt7r19.dll ${CompilerPath}/plbr19.dll ) + if(CMAKE_C_COMPILER_VERSION) + set(_compiler_version ${CMAKE_C_COMPILER_VERSION}) + else() + set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION}) endif() + string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}") + list(GET _watcom_version_list 0 _watcom_major) + list(GET _watcom_version_list 1 _watcom_minor) + set( __install__libs + ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll + ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll + ${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll ) foreach(lib ${__install__libs} ) |