-
Notifications
You must be signed in to change notification settings - Fork 19
/
CERTICPackOptions.cmake.in
25 lines (23 loc) · 1.21 KB
/
CERTICPackOptions.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Only mangle package name if binary package
if ("${CPACK_INSTALL_CMAKE_PROJECT}" STRGREATER "")
if (@MSVC@)
# FIXME We have to find way to evaluate CMAKE_CFG_INTDIR at cpack time
# or generate this current file at build time
# message("CMAKE_CFG_INTDIR=${CMAKE_CFG_INTDIR}")
set(PACKAGE_TYPE "NotSet")
include(@CERTI_BINARY_DIR@/PackageType.cmake OPTIONAL)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${PACKAGE_TYPE}-${CPACK_SYSTEM_NAME}")
else(@MSVC@)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-@CMAKE_BUILD_TYPE@-${CPACK_SYSTEM_NAME}")
endif(@MSVC@)
#Normalize CPACK_PACKAGE_VERSION for picky WiX
if ("${CPACK_GENERATOR}" STREQUAL "WIX")
string(REGEX MATCH "([0-9]*).*" CPACK_PACKAGE_VERSION_PATCH_WIX "${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION_PATCH_WIX ${CMAKE_MATCH_1})
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH_WIX}")
endif()
if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr/local")
set(CPACK_OSX_PACKAGE_VERSION "10.4")
endif()
endif()