-
Notifications
You must be signed in to change notification settings - Fork 1
/
CPackOptions.cmake.in
45 lines (38 loc) · 1.75 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)
#cmake_print_variables(CPACK_OUTPUT_FILE_PREFIX)
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}/LICENSE.TXT")
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" OR "${GIT_BRANCH}" STREQUAL "master"))
string(REPLACE "/" "_" GIT_BRANCH ${GIT_BRANCH})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${GIT_BRANCH}")
endif()
#set(CPACK_PACKAGE_EXECUTABLES "mvme;mvme")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "mvp")
set(CPACK_MONOLITHIC_INSTALL ON)
if (WIN32)
# https://cmake.org/cmake/help/v3.10/module/CPackNSIS.html
set(CPACK_CMAKE_GENERATOR "MSYS Makefiles")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "mesytec-mvp")
set(CPACK_NSIS_DISPLAY_NAME "mesytec mvp")
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\mvp.exe")
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/mvp")
endif()