From 0bc621bc0032f7e2104aa99f0f8f433bb5a9cdbc Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 21 May 2025 16:28:22 +0200 Subject: 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 --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0b37067..aeec6dfa8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -349,6 +349,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 ####################################################################### -- cgit v1.2.3