with this CMake
snipped:
install(TARGETS ${PROJECT_NAME} notifier consumer supplier RUNTIME COMPONENT ${PROJECT_NAME})
install(IMPORTED_RUNTIME_ARTIFACTS notifier RUNTIME_DEPENDENCY_SET _dependency_set)
# FIXME: not supported? CONFLICTING_DEPENDENCIES_PREFIX _conflicts
# cmake-format: off
install(
RUNTIME_DEPENDENCY_SET _dependency_set
POST_EXCLUDE_REGEXES ${CMAKE_SOURCE_DIR}/lib
POST_EXCLUDE_REGEXES ${CMAKE_SOURCE_DIR}/ACE/ACE/lib
POST_EXCLUDE_REGEXES ${CMAKE_STAGING_PREFIX}/lib
RUNTIME DESTINATION lib
)
# cmake-format: on
On Linux I get this result:
klein_cl:~/Workspace/cpp/axcioma$ ldd ${STAGE_DIR}/bin/consumer || objdump --dylibs-used --macho ${STAGE_DIR}/bin/consumer
linux-vdso.so.1 (0x00007fffc068a000)
libtaox11_portable_server.so.1.9.0 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libtaox11_portable_server.so.1.9.0 (0x00007f4b70a54000)
libtaox11_cosnaming_stub.so.1.9.0 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libtaox11_cosnaming_stub.so.1.9.0 (0x00007f4b70a2b000)
libtaox11_anytypecode.so.1.9.0 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libtaox11_anytypecode.so.1.9.0 (0x00007f4b7091d000)
libTAO_PortableServer.so.3.1.1 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libTAO_PortableServer.so.3.1.1 (0x00007f4b70837000)
libTAO_AnyTypeCode.so.3.1.1 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libTAO_AnyTypeCode.so.3.1.1 (0x00007f4b70774000)
libtaox11.so.1.9.0 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libtaox11.so.1.9.0 (0x00007f4b7070e000)
libTAO.so.3.1.1 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libTAO.so.3.1.1 (0x00007f4b70584000)
libx11_logger.so.1.9.0 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libx11_logger.so.1.9.0 (0x00007f4b70562000)
libACE.so.7.1.1 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libACE.so.7.1.1 (0x00007f4b703aa000)
libstdc++.so.6 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libstdc++.so.6 (0x00007f4b70130000)
libgcc_s.so.1 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libgcc_s.so.1 (0x00007f4b70100000)
libc.so.6 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libc.so.6 (0x00007f4b6ff00000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4b6fecb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4b70b70000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4b6fec0000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4b6feb0000)
libm.so.6 => /home/klein_cl/Workspace/cpp/axcioma/install/lib/libm.so.6 (0x00007f4b6fd61000)
klein_cl:~/Workspace/cpp/axcioma$ find ${STAGE_DIR}/lib -name 'lib*.so*' | egrep -v '(taox11|TAO|ACE)' | xargs ls -l
-rw-r--r-- 1 klein_cl klein_cl 2029592 Apr 7 2022 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libc-2.31.so
lrwxrwxrwx 1 klein_cl klein_cl 12 Sep 20 11:16 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libc.so.6 -> libc-2.31.so
-rw-r--r-- 1 klein_cl klein_cl 146000 Jul 11 10:50 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libgcc_s.so.1
-rw-r--r-- 1 klein_cl klein_cl 1369384 Apr 7 2022 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libm-2.31.so
lrwxrwxrwx 1 klein_cl klein_cl 12 Sep 20 11:16 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libm.so.6 -> libm-2.31.so
lrwxrwxrwx 1 klein_cl klein_cl 19 Sep 20 11:16 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libstdc++.so.6 -> libstdc++.so.6.0.32
-rw-r--r-- 1 klein_cl klein_cl 2526680 Jul 11 10:50 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libstdc++.so.6.0.32
lrwxrwxrwx 1 klein_cl klein_cl 22 Sep 20 11:16 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libx11_logger.so -> libx11_logger.so.1.9.0
-rw-r--r-- 1 klein_cl klein_cl 162160 Sep 15 12:57 /home/klein_cl/Workspace/cpp/axcioma/install/lib/libx11_logger.so.1.9.0
klein_cl:~/Workspace/cpp/axcioma$
On OSX, runtime libs
i.e. libc++, ...
are NOT installed?
objdump --dylibs-used --macho /Users/clausklein/Workspace/cpp/axcioma/install/bin/consumer
/Users/clausklein/Workspace/cpp/axcioma/install/bin/consumer:
@rpath/libtaox11_portable_server.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtaox11_cosnaming_stub.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtaox11_anytypecode.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libTAO_PortableServer.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libTAO_AnyTypeCode.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libtaox11.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libTAO.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libx11_logger.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libACE.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1600.151.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)