-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCPackUpdateVersion.cmake.in
15 lines (14 loc) · 1.31 KB
/
CPackUpdateVersion.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
file(READ @ILASTIK_VERSION_FILE@ ILASTIK_VERSION_FILE)
string(REGEX MATCH "__version_info__[^)]*\\)" ILASTIK_VERSION ${ILASTIK_VERSION_FILE})
string(REGEX REPLACE ".*\\( *([^, ]+).*" "\\1" ILASTIK_VERSION_MAJOR ${ILASTIK_VERSION})
string(REGEX REPLACE "[^,]*, *([^, ]+).*" "\\1" ILASTIK_VERSION_MINOR ${ILASTIK_VERSION})
string(REGEX REPLACE "[^,]*,[^,]*, *([^) ]+).*" "\\1" ILASTIK_VERSION_PATCH ${ILASTIK_VERSION})
SET(CPACK_NSIS_DISPLAY_NAME "ilastik-${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}")
SET(CPACK_NSIS_PACKAGE_NAME "ilastik-${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}")
SET(CPACK_PACKAGE_FILE_NAME "ilastik-${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}-${CPACK_SYSTEM_NAME}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "ilastik-${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "ilastik-${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION "${ILASTIK_VERSION_MAJOR}.${ILASTIK_VERSION_MINOR}.${ILASTIK_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${ILASTIK_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${ILASTIK_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${ILASTIK_VERSION_PATCH}")