@@ -181,14 +181,15 @@ endif()
181181
182182# Install directives
183183include (GNUInstallDirs )
184- install (TARGETS h5cpp DESTINATION ${CMAKE_INSTALL_BINDIR} )
185- install (FILES h5cpp.1 DESTINATION ${CMAKE_INSTALL_MANDIR} /man1)
184+ install (TARGETS h5cpp DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime )
185+ install (FILES h5cpp.1 DESTINATION ${CMAKE_INSTALL_MANDIR} /man1 COMPONENT runtime )
186186
187187# CMake helper modules for consumers
188188install (
189189 DIRECTORY cmake/
190190 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR} /cmake/h5cpp-compiler
191191 FILES_MATCHING PATTERN "*.cmake"
192+ COMPONENT runtime
192193)
193194
194195# CPack packaging
@@ -215,7 +216,11 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Source code transformation tool for HDF5
215216set (CPACK_PACKAGE_CONTACT "steven@vargalabs.com" )
216217set (CPACK_PACKAGE_LICENSE "MIT" )
217218set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR} /COPYRIGHT.txt" )
218- set (CPACK_MONOLITHIC_INSTALL 1)
219+ # MONOLITHIC is safe for DEB/RPM, but breaks productbuild on macOS
220+ # (CMake #18201: empty distribution XML when monolithic + productbuild)
221+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
222+ set (CPACK_MONOLITHIC_INSTALL 1)
223+ endif ()
219224
220225if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
221226 set (CPACK_PACKAGING_INSTALL_PREFIX "/usr" )
@@ -235,6 +240,12 @@ endif()
235240
236241include (CPack )
237242
243+ cpack_add_component (runtime
244+ DISPLAY_NAME "h5cpp-compiler"
245+ DESCRIPTION "Source code transformation tool for HDF5 H5CPP library"
246+ REQUIRED
247+ )
248+
238249option (H5CPP_BUILD_TESTS "Build h5cpp-compiler fixture tests" ON )
239250if (H5CPP_BUILD_TESTS)
240251 enable_testing ()
0 commit comments