diff --git a/CMakeLists.txt b/CMakeLists.txt index e4fe0a8..ada28be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -956,7 +956,8 @@ IF (WIN32 AND BUILD_INSTALLER) SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CUBICSDR_INSTALL_NAME} ${CPACK_PACKAGE_VERSION} (x86)") set(CMAKE_CL_64 FALSE) ENDIF(EX_PLATFORM EQUAL 64) - + SET(BUNDLE_MSVC_REDIST "" CACHE STRING "Visual C++ Redistributable") + set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") install(TARGETS CubicSDR RUNTIME DESTINATION .) @@ -1011,8 +1012,13 @@ IF (WIN32 AND BUILD_INSTALLER) set(CPACK_PACKAGE_EXECUTABLES CubicSDR "CubicSDR") IF (MSVC) - install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/external/msvc/${EX_PLATFORM_NAME}/vc_redist.${EX_PLATFORM_NAME}.exe DESTINATION vc_redist) - set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vc_redist\\\\vc_redist.${EX_PLATFORM_NAME}.exe\\\" /passive /norestart'") + IF (BUNDLE_MSVC_REDIST) + message(STATUS "BUNDLE_MSVC_REDIST: ${BUNDLE_MSVC_REDIST}") + cmake_path(GET BUNDLE_MSVC_REDIST FILENAME BUNDLE_MSVC_REDIST_FN) + message(STATUS "BUNDLE_MSVC_REDIST_FN: ${BUNDLE_MSVC_REDIST_FN}") + install(PROGRAMS ${BUNDLE_MSVC_REDIST} DESTINATION vc_redist) + set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\vc_redist\\\\${BUNDLE_MSVC_REDIST_FN}\\\" /passive /norestart'") + ENDIF() ENDIF (MSVC) diff --git a/external/msvc/x64/libwinpthread-1.dll b/external/msvc/x64/libwinpthread-1.dll deleted file mode 100644 index 020da4f..0000000 Binary files a/external/msvc/x64/libwinpthread-1.dll and /dev/null differ diff --git a/external/msvc/x64/vc_redist.x64.exe b/external/msvc/x64/vc_redist.x64.exe deleted file mode 100644 index 4fac196..0000000 Binary files a/external/msvc/x64/vc_redist.x64.exe and /dev/null differ