summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2025-05-21 16:28:22 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2025-05-24 15:42:47 +0200
commit0bc621bc0032f7e2104aa99f0f8f433bb5a9cdbc (patch)
treefa716cfa6d6b8cf51499a17b9f51e0c997c76025 /CMakeLists.txt
parent19684ae9d499a551a7627764de842877fdffb226 (diff)
Enable CPack support to build binary packages and installers
This minimal implementation works and enables basic (mostly default) CPack support to build binary packages of FLTK (RPM, TGZ, NSIS, ...). Users need the required tools like `rpmbuild` to build a particular type of package or installer. Using EPM or rpmbuild directly with a provided "list" file has been discontinued: fltk.list.in (EPM) and fltk.spec.in (RPM) have consequently been deleted. README.CPack.txt: basic documentation
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea0b37067..aeec6dfa8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -350,6 +350,18 @@ if(FLTK_BUILD_SHARED_LIBS AND GENERATE_EXPORT_HEADERS)
endif(FLTK_BUILD_SHARED_LIBS AND GENERATE_EXPORT_HEADERS)
#######################################################################
+# Configure CPack only if this is the top level project.
+# The logic may be extended if including CPack is made optional.
+# Currently it is included unconditionally for testing purposes.
+#######################################################################
+
+if(FLTK_IS_TOPLEVEL)
+
+ add_subdirectory(package)
+
+endif()
+
+#######################################################################
# Output Build Configuration Summary
#######################################################################