summaryrefslogtreecommitdiffstats
path: root/host/cmake
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-05-07 11:47:55 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-05-07 11:47:55 -0700
commita067783cf742a0f6ad10738e53897fea4a4c6163 (patch)
treeb7f7d49cc6e0a79bc96213644c9528424ea0f553 /host/cmake
parentf8fbc2f2bc03b61cedc7bd20f4b7b59063a74bbf (diff)
downloaduhd-a067783cf742a0f6ad10738e53897fea4a4c6163.tar.gz
uhd-a067783cf742a0f6ad10738e53897fea4a4c6163.tar.bz2
uhd-a067783cf742a0f6ad10738e53897fea4a4c6163.zip
cmake: add option to specify MSVC version in package filename
Diffstat (limited to 'host/cmake')
-rw-r--r--host/cmake/Modules/UHDPackage.cmake16
1 files changed, 15 insertions, 1 deletions
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()