summaryrefslogtreecommitdiff
path: root/distribution/posix/CMakeLists.txt
blob: 96636b0cbc74cea49ad81489f39d5b86cdc0b153 (plain)
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
# Setup packaging ...
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "XTrackCAD is a CAD program for designing model railroad layouts.")
set(CPACK_GENERATOR "RPM" "STGZ")
set(CPACK_SOURCE_GENERATOR "TGZ" "TBZ2" "ZIP")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_RPM_PACKAGE_LICENSE "GPL")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Engineering")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}////xtrkcad-desc.txt")
set(CPACK_PACKAGE_FILE_NAME "xtrkcad-setup-${XTRKCAD_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")

set(CPACK_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} )
set(CPACK_PACKAGING_INSTALL_PREFIX ${CPACK_INSTALL_PREFIX})

# get the specific configuration for each packager
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/package.txt)

set(CPACK_PACKAGE_VENDOR "XTrackCAD Fork Project")

# common dependencies for all Linux builds
set(CPACK_RPM_PACKAGE_REQUIRES "glibc gtk2")

# Add dependency to webkitgtk if configured
if(NOT XTRKCAD_USE_BROWSER)
	set(CPACK_RPM_PACKAGE_REQUIRES 
	    "${CPACK_RPM_PACKAGE_REQUIRES} webkitgtk")
endif()

# exclude these directories from the rpm
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
	"/usr/local"
	"/usr/local/share"
	"/usr/local/bin" 
	"/usr/share/locale"
	"/usr/share/locale/*"
	"/usr/local/share/locale"
	"/usr/local/share/locale/*"
	"/usr/share/applications"
	"/usr/share/pixmaps"
)

set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}////changelog.txt")

include(CPack)