cmake: align with autotools build output and packaging#6
Open
pauljevans wants to merge 3 commits into
Open
Conversation
Headers were installing to /usr/include/ instead of /usr/include/scsi/, breaking #include <scsi/smp_lib.h>. Also fixed the INSTALL_INTERFACE generator expression which had a bogus double /include/include path. Aligned CPack package names with the existing .spec and debian/control: RPM uses smp_utils-libs/smp_utils-devel, DEB uses libsmputils1-1. Added missing Requires on the RPM devel package for the runtime library. Signed-off-by: Paul Evans <pevans@redhat.com>
… config.h Autotools/libtool builds both libsmputils1.so and libsmputils1.a in a single pass by default. The CMake build was only producing one or the other. Both the .spec and debian/libsmputils1-dev.install expect the static library in the devel package, so its absence would fail the build. Added -Wall -W -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 to the default CMake compile flags to match what autotools sets via AM_CPPFLAGS and AM_CFLAGS. Added HAVE_CONFIG_H to the library targets so config.h is included during compilation. Without it the library was built without platform defines like SMP_LIB_LINUX and HAVE_BYTESWAP_H. Signed-off-by: Paul Evans <pevans@redhat.com>
Signed-off-by: Paul Evans <pevans@redhat.com>
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.
Fix header installation path to use /usr/include/scsi/ instead of /usr/include/, matching autotools. Fix the INSTALL_INTERFACE generator expression which had a double include/ path.
Align CPack package names with the existing .spec and debian/control:
RPM uses smp_utils-libs/smp_utils-devel, DEB uses libsmputils1-1. Add missing Requires/Depends on devel packages for the runtime library.
Build both shared and static libraries by default, matching libtool behaviour. Add -Wall -W -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 to compile flags and define HAVE_CONFIG_H on library targets so config.h is used during compilation.