summaryrefslogtreecommitdiff
path: root/README.CPack.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 /README.CPack.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 'README.CPack.txt')
-rw-r--r--README.CPack.txt83
1 files changed, 83 insertions, 0 deletions
diff --git a/README.CPack.txt b/README.CPack.txt
new file mode 100644
index 000000000..e9f11dd85
--- /dev/null
+++ b/README.CPack.txt
@@ -0,0 +1,83 @@
+README.CPack.txt - Building Binary Packages with CPack
+-------------------------------------------------------
+
+Intended Audience
+-----------------
+
+"Packagers" (maintainers) of Linux distributions or users who want to
+deploy FLTK binary packages on multiple systems, e.g. companies using
+FLTK for their software development.
+
+
+Introduction
+------------
+
+In previous FLTK versions binary packages could be created using EPM
+(an external tool) or `rpmbuild` on Linux. Both tools used files no
+longer provided by FLTK: 'fltk.list' (EPM) and 'fltk.spec' (RPM).
+
+FLTK 1.5 and later supports CPack to create binary "packages". The new
+approach using CPack is more flexible and supports many more package
+formats. CPack is usually installed together with CMake.
+
+CPack support is still experimental and may be improved in the future.
+The documentation below may be enhanced later if required.
+
+
+How To Build Binary Packages
+----------------------------
+
+On some platforms and with some "generators" CMake creates the target
+'package' so you can execute e.g. `make package` after building FLTK.
+This creates the default set of packages for the given platform.
+
+On other platforms, or to use more flexible options, `cpack` may be run
+from the commandline after building FLTK to generate a particular package
+format. For details please refer to the CMake and CPack documentation.
+
+
+Example Commands On Linux Using Ninja
+-------------------------------------
+
+1. Build the FLTK library:
+
+$ cd /path-to-fltk
+$ cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -B build
+$ cmake --build build
+
+2. Create one or more binary packages:
+
+$ cmake --build build --target package
+
+... or ...
+
+$ cd build
+$ ninja package # or `make package` if you're using Makefiles
+
+... or to build (only) the RPM package:
+
+$ cpack -G RPM
+
+... or to build a .tar.gz package:
+
+$ cpack -G TGZ
+
+See `cpack --help` for possible package formats ("Generators").
+
+Note: you need to install the package format specific tools on your system
+to create some package formats, e.g. `rpmbuild` for RPM packages.
+
+
+Further Reading
+---------------
+
+More information on this topic can be found in the CMake and CPack
+documentation or by executing `cpack --help`.
+
+
+Links: To Documentation
+-----------------------
+
+https://cmake.org/cmake/help/latest/index.html
+https://cmake.org/cmake/help/latest/manual/cmake.1.html
+https://cmake.org/cmake/help/latest/manual/cpack.1.html