forked from gflags/gflags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.cmake.in
49 lines (40 loc) · 2.03 KB
/
package.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
46
47
48
49
# Per-generator CPack configuration file. See CPACK_PROJECT_CONFIG_FILE documented at
# http://www.cmake.org/cmake/help/v2.8.12/cpack.html#variable:CPACK_PROJECT_CONFIG_FILE
#
# All common CPACK_* variables are set in CMakeLists.txt already. This file only
# overrides some of these to provide package generator specific settings.
# whether package contains all development files or only runtime files
set (DEVEL @INSTALL_HEADERS@)
# ------------------------------------------------------------------------------
# Mac OS X package
if (CPACK_GENERATOR MATCHES "PackageMaker|DragNDrop")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
if (DEVEL)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}")
# ------------------------------------------------------------------------------
# Debian package
elseif (CPACK_GENERATOR MATCHES "DEB")
set (CPACK_PACKAGE_FILE_NAME "lib${CPACK_PACKAGE_NAME}")
if (DEVEL)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-dev")
else ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}0")
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION}-1_${CPACK_PACKAGE_ARCHITECTURE}")
set (CPACK_DEBIAN_PACKAGE_DEPENDS)
set (CPACK_DEBIAN_PACKAGE_SECTION "devel")
set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_RPM_PACKAGE_URL}")
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_PACKAGE_ARCHITECTURE}")
# ------------------------------------------------------------------------------
# RPM package
elseif (CPACK_GENERATOR MATCHES "RPM")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
if (DEVEL)
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
endif ()
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}-1.${CPACK_PACKAGE_ARCHITECTURE}")
endif ()