-
Notifications
You must be signed in to change notification settings - Fork 115
/
InstallLinux.cmake
44 lines (32 loc) · 1.71 KB
/
InstallLinux.cmake
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
# **** Install targets for Linux ****
function(setup_install_targets)
set(DEFAULT_DATA_PATH_BASE share/applications/heimer)
if(NOT BIN_PATH)
set(BIN_PATH bin)
endif()
message(STATUS "Linux/Unix build with system install targets.")
# Install binaries and data
install(PROGRAMS ${CMAKE_BINARY_DIR}/${BINARY_NAME} DESTINATION ${BIN_PATH})
# Install .desktop files
install(FILES ${CMAKE_BINARY_DIR}/heimer.desktop DESTINATION share/applications)
# Install app store meta data
install(FILES src/heimer.appdata.xml DESTINATION share/metainfo)
# Install icons
install(FILES data/icons/heimer.png DESTINATION share/pixmaps)
install(FILES data/icons/heimer.png DESTINATION share/icons/hicolor/256x256/apps)
set(CPACK_DEBIAN_PACKAGE_NAME "heimer")
set(CPACK_DEBIAN_PACKAGE_VERSION ${APPLICATION_VERSION})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jussi Lind <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Simple mind map creation tool.")
set(CPACK_DEBIAN_PACKAGE_SECTION "Education")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES)
if(DISTRO_VERSION)
message(STATUS "Distro version: ${DISTRO_VERSION}")
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${DISTRO_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
else()
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
endif()
include(CPack)
endfunction()