-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added packaging using CPack and pkg-config. #64
base: master
Are you sure you want to change the base?
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
||
if(CMAKE_SYSTEM_NAME STREQUAL Linux) | ||
# this might be a bit too restrictive, since for other (BSD, ...) this might apply also | ||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.