Size: 907
Comment:
|
Size: 1522
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents>> |
|
Line 3: | Line 5: |
CMake can automatically create distribution packages (e.g. Redhat/Fedora .rpm, Debian/Ubuntu .deb, etc), though the created packages will any information on dependencies. To create these packages, add at the end of CMakeLists.txt: | CMake can automatically create packages for several distributions (e.g. Redhat/Fedora .rpm, Debian/Ubuntu .deb, etc), though the created packages will lack dependency information. To create these packages, add at the end of CMakeLists.txt: |
Line 23: | Line 25: |
== Good examples == https://github.com/videolan/x265 https://github.com/Qartar/qflags/blob/master/CMakeLists.txt == External links == [[https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/|Create dlls on Windows without declspec() using new CMake export all feature | The Kitware Blog]]: have CMake already export symbols for DLLs. https://gcc.gnu.org/wiki/Visibility provides an alternative. [[http://stackoverflow.com/a/26038443/14878|Difference between PRIVATE, PUBLIC, and INTERFACE]] ---- CategoryCheatSheet |
Creating distribution packages with CMake
CMake can automatically create packages for several distributions (e.g. Redhat/Fedora .rpm, Debian/Ubuntu .deb, etc), though the created packages will lack dependency information. To create these packages, add at the end of CMakeLists.txt:
Modify the variables to create an package with the appropriate name and metadata fields. After building the package, run:
1 make package
Source: Harold Sitter's Checkinstall DEBs done the CMake way...
Good examples
https://github.com/videolan/x265
https://github.com/Qartar/qflags/blob/master/CMakeLists.txt
External links
Create dlls on Windows without declspec() using new CMake export all feature: have CMake already export symbols for DLLs. https://gcc.gnu.org/wiki/Visibility provides an alternative.
Difference between PRIVATE, PUBLIC, and INTERFACE