-
Notifications
You must be signed in to change notification settings - Fork 0
/
CPackOptions.cmake.in
45 lines (37 loc) · 1.7 KB
/
CPackOptions.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# vim:ft=cmake
#include(CMakePrintHelpers)
#cmake_print_variables(CPACK_TEMPORARY_DIRECTORY)
#cmake_print_variables(CPACK_TOPLEVEL_DIRECTORY)
#cmake_print_variables(CPACK_PACKAGE_DIRECTORY)
#cmake_print_variables(CPACK_PACKAGE_FILE_NAME)
set(PROJECT_NAME "@CMAKE_PROJECT_NAME@")
set(PACKAGE_ARCH_STRING "@PACKAGE_ARCH_STRING@")
set(PACKAGE_VERSION "@GIT_VERSION_SHORT@")
set(SOURCE_DIR "@CMAKE_SOURCE_DIR@")
set(GIT_BRANCH "@GIT_BRANCH@")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}-${PACKAGE_ARCH_STRING}")
set(CPACK_RESOURCE_FILE_LICENSE "${SOURCE_DIR}/copying")
set(CPACK_STRIP_FILES TRUE)
set(CPACK_PACKAGE_CHECKSUM SHA256)
# Include the branch name in the package if it's not the main branch.
if (GIT_BRANCH AND NOT "${GIT_BRANCH}" STREQUAL "main")
string(REPLACE "/" "_" GIT_BRANCH ${GIT_BRANCH})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${GIT_BRANCH}")
endif()
set(CPACK_PACKAGE_INSTALL_DIRECTORY "mesydaq2")
if (WIN32)
# https://cmake.org/cmake/help/v3.10/module/CPackNSIS.html
set(CPACK_OUTPUT_FILE_PREFIX "c:\\src\\mesydaq2-packages")
set(CPACK_CMAKE_GENERATOR "MSYS Makefiles")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "mesytec-mesydaq2")
set(CPACK_NSIS_DISPLAY_NAME "mesytec mesydaq2")
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\mesydaq2.exe")
#set(CPACK_MONOLITHIC_INSTALL 1)
file(MAKE_DIRECTORY ${CPACK_OUTPUT_FILE_PREFIX})
else()
set(CPACK_OUTPUT_FILE_PREFIX "packages")
set(LINUXDEPLOYQT_EXECUTABLE "@LINUXDEPLOYQT_EXECUTABLE@")
# Sadly can only specifiy a single binary here which then dictates which
# libraries linuxdeployqt picks up.
set(DEPLOY_BINARY "bin/mesydaq2")
endif()