From a067783cf742a0f6ad10738e53897fea4a4c6163 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Wed, 7 May 2014 11:47:55 -0700 Subject: cmake: add option to specify MSVC version in package filename --- host/cmake/Modules/UHDPackage.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'host/cmake/Modules') diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 8422c24d6..d1c0fc099 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -87,7 +87,21 @@ IF(${CPACK_GENERATOR} STREQUAL NSIS) include(CheckTypeSize) check_type_size("void*[8]" BIT_WIDTH BUILTIN_TYPES_ONLY) - SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}") + # If CMake option given, specify MSVC version in installer filename + IF(SPECIFY_MSVC_VERSION) + IF(MSVC90) # Visual Studio 2008 (9.0) + SET(MSVC_VERSION "VS2008") + ELSEIF(MSVC10) # Visual Studio 2010 (10.0) + SET(MSVC_VERSION "VS2010") + ELSEIF(MSVC11) # Visual Studio 2012 (11.0) + SET(MSVC_VERSION "VS2012") + ELSEIF(MSVC12) # Visual Studio 2013 (12.0) + SET(MSVC_VERSION "VS2013") + ENDIF() + SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}_${MSVC_VERSION}") + ELSE() + SET(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}") + ENDIF(SPECIFY_MSVC_VERSION) SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}") ENDIF() -- cgit v1.2.3