cmake: fix build and achieve parity with autotools - #6
Open
pauljevans wants to merge 4 commits into
Open
Conversation
Use pkg_check_modules() to find both the library and its include path (e.g. /usr/include/scsi on Ubuntu), with find_library/find_path fallback. Remove redundant add_definitions(-DSG_LIB_LINUX), fix static build to use target_link_options instead of add_definitions. Signed-off-by: Paul Evans <pevans@redhat.com>
Add missing feature checks, platform-specific defines and flags, and fix doc/CMakeLists.txt paths. Clean up config.h.in.cmake and add CPack RPM/DEB runtime dependencies. Bump minimum to 3.18. Signed-off-by: Paul Evans <pevans@redhat.com>
Signed-off-by: Paul Evans <pevans@redhat.com>
Signed-off-by: Paul Evans <pevans@redhat.com>
Owner
|
Missed this one. Already applied some of this one upstream. Hand applying now and on Ubuntu 26.04 I get "Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)". Continuing to apply ... |
doug-gilbert
added a commit
that referenced
this pull request
Jun 10, 2026
…BSD work from my end git-svn-id: https://svn.bingwo.ca/repos/sdparm/trunk@401 c1e33020-0f26-4edd-b954-b49f5d3ab223
Owner
|
Now applied the rest of this PR by hand upstream. That is subversion revision 401 and what looks like github commit abf32f3 . Please review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the CMake build so it correctly discovers and links against the
system-installed libsgutils2 on both Debian/Ubuntu and Fedora/RHEL,
and bring feature checks, platform support, and packaging to parity
with the autotools build.
Add all the feature checks and platform support that were present
in the autotools build but missing from CMake.
both the sgutils2 library and its headers.
correct Debian package names. Only enable DEB/RPM generators when
dpkg/rpmbuild are present.