Skip to content

cmake: align with autotools build output and packaging#6

Open
pauljevans wants to merge 3 commits into
doug-gilbert:mainfrom
pauljevans:cmake
Open

cmake: align with autotools build output and packaging#6
pauljevans wants to merge 3 commits into
doug-gilbert:mainfrom
pauljevans:cmake

Conversation

@pauljevans
Copy link
Copy Markdown

@pauljevans pauljevans commented May 26, 2026

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant