summaryrefslogtreecommitdiff
path: root/distribution/posix/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/posix/CMakeLists.txt')
-rw-r--r--distribution/posix/CMakeLists.txt45
1 files changed, 27 insertions, 18 deletions
diff --git a/distribution/posix/CMakeLists.txt b/distribution/posix/CMakeLists.txt
index 7a0ee50..96636b0 100644
--- a/distribution/posix/CMakeLists.txt
+++ b/distribution/posix/CMakeLists.txt
@@ -1,23 +1,32 @@
# 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})
+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_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()
-SET(CPACK_PACKAGE_VENDOR "XTrackCAD Fork Project")
-SET(CPACK_RPM_PACKAGE_REQUIRES "glibc gtk2 webkitgtk")
-# exclude these directories from the rpm
-SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
+# exclude these directories from the rpm
+set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr/local"
"/usr/local/share"
"/usr/local/bin"
@@ -29,7 +38,7 @@ SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr/share/pixmaps"
)
-SET(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}////changelog.txt")
+set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}////changelog.txt")
-INCLUDE(CPack)
+include(CPack)