You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feature: added CPack Support
* Added test case for cpack
* refactor testing for cpack
* bump CI CMake version to 3.18.4
* remove redundant apt install code
---------
Co-authored-by: Lars Melchior <lars.melchior@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@
5
5
Creating installable CMake scripts always requires a large amount of boilerplate code to get things working.
6
6
This small script should simplify the CMake packaging process into a single, easy-to-use command.
7
7
8
+
PackageProject.cmake has been tested with CMake v3.18.4.
9
+
8
10
## Usage
9
11
10
12
To create an installable target for your current project, add the following to your CMakeLists.txt.
@@ -45,7 +47,20 @@ packageProject(
45
47
# (optional) option to ignore target architecture for package resolution
46
48
# defaults to YES for header only (i.e. INTERFACE) libraries
47
49
ARCH_INDEPENDENT YES
50
+
# (optional) option to generate CPack variables
51
+
CPACK YES
48
52
)
49
53
```
50
54
55
+
## CPack
56
+
57
+
We provide only the most basic variables for CPack generation, however this might not be enough
58
+
for each and every generator.
59
+
60
+
For example, Debians' DEB generator needs additionally [`CPACK_DEBIAN_PACKAGE_MAINTAINER`](https://cmake.org/cmake/help/latest/cpack_gen/deb.html#variable:CPACK_DEBIAN_PACKAGE_MAINTAINER) or a `CPACK_PACKAGE_CONTACT`:
61
+
62
+
```cmake
63
+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Foo Bar <foo@bar.local>")
64
+
```
65
+
51
66
If you need extra functionality feel free to open an issue or a PR.
0 commit comments