Skip to content

cmake: bring build output into parity with autotools for packaging#82

Open
pauljevans wants to merge 1 commit into
doug-gilbert:mainfrom
pauljevans:cmake
Open

cmake: bring build output into parity with autotools for packaging#82
pauljevans wants to merge 1 commit into
doug-gilbert:mainfrom
pauljevans:cmake

Conversation

@pauljevans
Copy link
Copy Markdown
Contributor

Update the shared library naming to match autotools conventions: use OUTPUT_NAME with the project version embedded, VERSION 2.0.0 and SOVERSION 2 (matching libtool -version-info 2:0:0), with a development symlink following the autotools -release naming. This ensures the cmake and autotools builds produce compatible SONAME and library filenames.

Additional changes for parity:

  • install headers to /include/scsi/ to match autotools
  • fix INSTALL_INTERFACE include path (was double-nested include/include)
  • install all 9 scripts, not just rescan-scsi-bus.sh
  • link sgp_dd with pthread, sg_seek and sg_turs with rt (as-needed)
  • add -Wall -W, use -std=c99 (not gnu99), and define _LARGEFILE64_SOURCE and _FILE_OFFSET_BITS=64
  • define HAVE_NVME in config.h when nvme_ioctl.h is present, enabling NVMe passthrough support to match autotools builds
  • align CPack RPM names with Fedora/RHEL (sg3_utils-libs, sg3_utils-devel)
  • align CPack DEB runtime name with Debian (libsgutils2-2)

…aging

Update the shared library naming to match autotools conventions: use
OUTPUT_NAME with the project version embedded, VERSION 2.0.0 and
SOVERSION 2 (matching libtool -version-info 2:0:0), with a development
symlink following the autotools -release naming. This ensures the cmake
and autotools builds produce compatible SONAME and library filenames.

Additional changes for parity:
- install headers to <prefix>/include/scsi/ to match autotools
- fix INSTALL_INTERFACE include path (was double-nested include/include)
- install all 9 scripts, not just rescan-scsi-bus.sh
- link sgp_dd with pthread, sg_seek and sg_turs with rt (as-needed)
- add -Wall -W, use -std=c99 (not gnu99), and define
  _LARGEFILE64_SOURCE and _FILE_OFFSET_BITS=64
- define HAVE_NVME in config.h when nvme_ioctl.h is present, enabling
  NVMe passthrough support to match autotools builds
- align CPack RPM names with Fedora/RHEL (sg3_utils-libs, sg3_utils-devel)
- align CPack DEB runtime name with Debian (libsgutils2-2)

Signed-off-by: Paul Evans <pevans@redhat.com>
doug-gilbert added a commit that referenced this pull request May 28, 2026
…parity) with what Autotools produces; add else and message to cpack code generator in this patch; update date stamps

git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@1120 6180dd3e-e324-4e3e-922d-17de1ae2f315
@doug-gilbert
Copy link
Copy Markdown
Owner

Thanks for this patch. It has been applied upstream with a comment that references this PR. Copied the new ideas to smp_utils as it has a similar structure to sg3_utils. Next will be to update the CMakeLists.txt hierarchy with these ideas in sdparm, then ripple through my other packages. It's an iterative process ... Xose has provided a script to address my bidirectional workflow issues (github <--> my_git_svn_transition_repo <--> my svn_repo . Most published workflows assume a one way (svn --> github), once only process.

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.

2 participants