Added packaging using CPack and pkg-config.#64
Added packaging using CPack and pkg-config.#64KOLANICH wants to merge 1 commit intoadishavit:masterfrom
Conversation
|
Thank you for your contribution!! I have no idea what you did - I am not familiar with CPack. |
|
It will affect all builds. I.e. one can generate installers for Windows (using NSIS, WiX and Qt installer Framework) since now (but I don't recommend it, for such libs just a zip archive is better, of course it can also be generated). If you use MSYS2, its pkg-config should work too, when the resulting archive is unpacked properly. Currently CPack doesn't support pacman (a package manager used in Arch Linux distro, but it is cross-platform, so MSYS2 uses it too), which is used in MSYS2, so no package installable with it can be generated out of the box. |
|
Is this ready to merge? |
|
Pinging @a4z @BillyONeal @memsharded @sehe (et al). |
memsharded
left a comment
There was a problem hiding this comment.
I am not an expert in CPack, but I'd say it is looking good. A different discussion is if the packaging specific code should belong to the library source repo or to the package system, but this would be a difficult one, and I don't think this is a discussion that belongs here.
CMakeLists.txt
Outdated
| # but this can be fixed later in extra pull requests from people on the platform | ||
| install(FILES argh-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) | ||
| install(EXPORT arghTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) | ||
| install(FILES "${PackagingTemplatesDir}/argh-config.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR_ARCHIND}/cmake/argh) |
There was a problem hiding this comment.
This change might require changes in other package managers, that will need to adapt to the new install layout. As long as changes come in a new version, it is doable, but extra effort to implement by other package managers, which logic might become dirtier:
if argh-version < x.y.z:
files installed in cmake/argh
else
files installed in arch/cmake/argh
There was a problem hiding this comment.
This change might require changes in other package managers, that will need to adapt to the new install layout.
IDK if really. Debian/Ubuntu, Fedora and Arch already support this layout, so it is not "new". IDK about other distros.
|
SInce my 2 cents where requested, here they are: I have no idea about using cmake as packaging tool, since I do not know any serious project where such packages are used. |
Surely there is, but it would require quite a lot of work to do it properly. |
|
What's new? |
|
Nothing new, just rebased. |
Fixed installation dir of configs - it must be arch-independent for a header-only library.
Fixed installation dir of configs - it must be arch-independent for a header-only library.