소스 검색

Merge pull request #8530 from GordonSmith/HPCC-15412

HPCC-15412 Use vcredist.exe to install vc runtimes

Reviewed-By: Xiaoming Wang <xiaoming.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 년 전
부모
커밋
738c9e9f9c
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      CMakeLists.txt

+ 15 - 0
CMakeLists.txt

@@ -156,7 +156,22 @@ endif(APPLE OR WIN32)
 ###
 ## CPack install and packaging setup.
 ###
+set ( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE )
 include(InstallRequiredSystemLibraries)
+if (MSVC14)
+    find_file(MSVC14_REDIST "vcredist_x86.exe" HINTS ${MSVC14_REDIST_DIR}/1033 )
+    if (EXISTS "${MSVC14_REDIST}")
+        install ( PROGRAMS ${MSVC14_REDIST} DESTINATION tmp )
+        get_filename_component(MSVC14_REDIST_NAME ${MSVC14_REDIST} NAME)
+        list ( APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " 
+            ExecWait '$INSTDIR\\\\tmp\\\\${MSVC14_REDIST_NAME} /S'
+        ")
+    else ()
+        MESSAGE(WARNING "-- Unable to locate vcredist_x86.exe")
+    endif ()
+else ()
+    MESSAGE(WARNING "-- Unknown compiler version")
+endif ()
 
 set(VER_SEPARATOR "-")
 if("${stagever}" MATCHES "^rc[0-9]+$")