diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index 26fe30f166..a1cd04192f 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -9,8 +9,8 @@ if(PCAPPP_INSTALL) install( TARGETS light_pcapng EXPORT PcapPlusPlusTargets - ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} - LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} + ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT devel + LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT runtime + PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} COMPONENT devel ) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index d6f074d527..cfc0e26656 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -381,7 +381,11 @@ if(PCAPPP_INSTALL) "${CMAKE_CURRENT_BINARY_DIR}/PcapPlusPlus.pc" @ONLY ) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PcapPlusPlus.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/PcapPlusPlus.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT devel + ) endif() # CMake helpers to compile Pcap++ with CMake (only if PCAP is used) @@ -405,7 +409,7 @@ if(PCAPPP_INSTALL) pcapp_install_cmake_module(ZSTD) endif() - install(EXPORT PcapPlusPlusTargets DESTINATION ${PCAPPP_INSTALL_CMAKEDIR} NAMESPACE PcapPlusPlus::) + install(EXPORT PcapPlusPlusTargets DESTINATION ${PCAPPP_INSTALL_CMAKEDIR} NAMESPACE PcapPlusPlus:: COMPONENT devel) configure_package_config_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/PcapPlusPlusConfig.cmake.in" @@ -437,6 +441,12 @@ if(PCAPPP_PACKAGE) set(CPACK_PACKAGE_NAME "pcapplusplus") set(CPACK_PACKAGE_VERSION "${PCAPPP_VERSION}") set(CPACK_PACKAGE_MAINTAINER "seladb") + set(CPACK_COMPONENTS_ALL runtime devel examples) + set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Shared libraries and runtime files required to run PcapPlusPlus-based applications.") + set(CPACK_COMPONENT_DEVEL_DESCRIPTION "Header files, CMake configuration, and other resources needed for developing with PcapPlusPlus.") + set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "A collection of example applications demonstrating how to use PcapPlusPlus features and APIs.") + set(CPACK_COMPONENT_STATIC_DESCRIPTION "Static library files for linking PcapPlusPlus directly into your applications.") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_MAINTAINER}") set( CPACK_PACKAGE_DESCRIPTION_SUMMARY @@ -445,6 +455,10 @@ if(PCAPPP_PACKAGE) # Default output a .tar.gz set(CPACK_GENERATOR "TGZ") + # Archive will include all components (Runtime, Development, Examples, Static, etc.) + set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF) + # Enable component-based packaging for DEB generator + set(CPACK_DEB_COMPONENT_INSTALL ON) # Remove the tweak for Compiler Version string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) @@ -471,7 +485,7 @@ if(PCAPPP_PACKAGE) cmake_host_system_information(RESULT DISTRO_VERSION_ID QUERY DISTRIB_VERSION_ID) set(_PCAPPP_PACKAGE_README_CUSTOM_PATH "${_PCAPPP_PACKAGE_README_PATH}/README.release.linux") if("${DISTRO_ID}" STREQUAL "ubuntu") - # set(CPACK_GENERATOR ${CPACK_GENERATOR};DEB) + set(CPACK_GENERATOR ${CPACK_GENERATOR};DEB) elseif("${DISTRO_ID}" STREQUAL "centos" OR "${DISTRO_ID}" STREQUAL "rhel") # set(CPACK_GENERATOR ${CPACK_GENERATOR};RPM) elseif("${DISTRO_ID}" STREQUAL "freebsd") diff --git a/Common++/CMakeLists.txt b/Common++/CMakeLists.txt index 24525a2cb4..b112efdf75 100644 --- a/Common++/CMakeLists.txt +++ b/Common++/CMakeLists.txt @@ -58,10 +58,10 @@ if(PCAPPP_INSTALL) install( TARGETS Common++ EXPORT PcapPlusPlusTargets - ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} - LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} - RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} + ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT devel + LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT runtime + PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} COMPONENT devel + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT runtime ) endif() diff --git a/Examples/ArpSpoofing/CMakeLists.txt b/Examples/ArpSpoofing/CMakeLists.txt index aba6a4272a..96cdfa4d5e 100644 --- a/Examples/ArpSpoofing/CMakeLists.txt +++ b/Examples/ArpSpoofing/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(ArpSpoofing PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS ArpSpoofing EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS ArpSpoofing + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/Arping/CMakeLists.txt b/Examples/Arping/CMakeLists.txt index e2fd12f0cb..7716c88604 100644 --- a/Examples/Arping/CMakeLists.txt +++ b/Examples/Arping/CMakeLists.txt @@ -10,5 +10,5 @@ endif() set_target_properties(Arping PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS Arping EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install(TARGETS Arping EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples) endif() diff --git a/Examples/DNSResolver/CMakeLists.txt b/Examples/DNSResolver/CMakeLists.txt index 8c0b0782cd..3e253cc160 100644 --- a/Examples/DNSResolver/CMakeLists.txt +++ b/Examples/DNSResolver/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(DNSResolver PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS DNSResolver EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS DNSResolver + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/DnsSpoofing/CMakeLists.txt b/Examples/DnsSpoofing/CMakeLists.txt index 8213558ba8..c1b6188857 100644 --- a/Examples/DnsSpoofing/CMakeLists.txt +++ b/Examples/DnsSpoofing/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(DnsSpoofing PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS DnsSpoofing EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS DnsSpoofing + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/DpdkBridge/CMakeLists.txt b/Examples/DpdkBridge/CMakeLists.txt index 972369fdbc..288dc6be0a 100644 --- a/Examples/DpdkBridge/CMakeLists.txt +++ b/Examples/DpdkBridge/CMakeLists.txt @@ -5,5 +5,5 @@ target_link_libraries(DpdkBridge PUBLIC PcapPlusPlus::Pcap++) set_target_properties(DpdkBridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS DpdkBridge EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install(TARGETS DpdkBridge EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples) endif() diff --git a/Examples/DpdkExample-FilterTraffic/CMakeLists.txt b/Examples/DpdkExample-FilterTraffic/CMakeLists.txt index 25f02b628d..76dddd0d95 100644 --- a/Examples/DpdkExample-FilterTraffic/CMakeLists.txt +++ b/Examples/DpdkExample-FilterTraffic/CMakeLists.txt @@ -5,5 +5,9 @@ target_link_libraries(DpdkTrafficFilter PUBLIC PcapPlusPlus::Pcap++) set_target_properties(DpdkTrafficFilter PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS DpdkTrafficFilter EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS DpdkTrafficFilter + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/HttpAnalyzer/CMakeLists.txt b/Examples/HttpAnalyzer/CMakeLists.txt index b8d2900353..35245ba821 100644 --- a/Examples/HttpAnalyzer/CMakeLists.txt +++ b/Examples/HttpAnalyzer/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(HttpAnalyzer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS HttpAnalyzer EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS HttpAnalyzer + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/IPDefragUtil/CMakeLists.txt b/Examples/IPDefragUtil/CMakeLists.txt index ee127e650f..ed544bc079 100644 --- a/Examples/IPDefragUtil/CMakeLists.txt +++ b/Examples/IPDefragUtil/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(IPDefragUtil PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS IPDefragUtil EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS IPDefragUtil + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/IPFragUtil/CMakeLists.txt b/Examples/IPFragUtil/CMakeLists.txt index d1936cb0e1..56cfbdfef2 100644 --- a/Examples/IPFragUtil/CMakeLists.txt +++ b/Examples/IPFragUtil/CMakeLists.txt @@ -10,5 +10,5 @@ endif() set_target_properties(IPFragUtil PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS IPFragUtil EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install(TARGETS IPFragUtil EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples) endif() diff --git a/Examples/IcmpFileTransfer/CMakeLists.txt b/Examples/IcmpFileTransfer/CMakeLists.txt index a15fadcb1a..0e07788b0d 100644 --- a/Examples/IcmpFileTransfer/CMakeLists.txt +++ b/Examples/IcmpFileTransfer/CMakeLists.txt @@ -10,7 +10,11 @@ endif() set_target_properties(IcmpFileTransfer-catcher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS IcmpFileTransfer-catcher EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS IcmpFileTransfer-catcher + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() add_executable(IcmpFileTransfer-pitcher Common.cpp IcmpFileTransfer-pitcher.cpp) @@ -25,5 +29,9 @@ endif() set_target_properties(IcmpFileTransfer-pitcher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS IcmpFileTransfer-pitcher EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS IcmpFileTransfer-pitcher + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/KniPong/CMakeLists.txt b/Examples/KniPong/CMakeLists.txt index 71a6e9828c..14acf2e98c 100644 --- a/Examples/KniPong/CMakeLists.txt +++ b/Examples/KniPong/CMakeLists.txt @@ -5,5 +5,5 @@ target_link_libraries(KniPong PUBLIC PcapPlusPlus::Pcap++) set_target_properties(KniPong PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS KniPong EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install(TARGETS KniPong EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples) endif() diff --git a/Examples/PcapPlusPlus-benchmark/CMakeLists.txt b/Examples/PcapPlusPlus-benchmark/CMakeLists.txt index 81955134e0..d6adeab5f7 100644 --- a/Examples/PcapPlusPlus-benchmark/CMakeLists.txt +++ b/Examples/PcapPlusPlus-benchmark/CMakeLists.txt @@ -33,9 +33,17 @@ else() endif() if(PCAPPP_INSTALL) - install(TARGETS BenchmarkExample EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS BenchmarkExample + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) if(TARGET BenchmarkExampleGoogle) - install(TARGETS BenchmarkExampleGoogle EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS BenchmarkExampleGoogle + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() endif() diff --git a/Examples/PcapPrinter/CMakeLists.txt b/Examples/PcapPrinter/CMakeLists.txt index 5c9800de5c..1f4a2b18e4 100644 --- a/Examples/PcapPrinter/CMakeLists.txt +++ b/Examples/PcapPrinter/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(PcapPrinter PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS PcapPrinter EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS PcapPrinter + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/PcapSearch/CMakeLists.txt b/Examples/PcapSearch/CMakeLists.txt index 389e96177e..01669fe243 100644 --- a/Examples/PcapSearch/CMakeLists.txt +++ b/Examples/PcapSearch/CMakeLists.txt @@ -11,5 +11,5 @@ endif() set_target_properties(PcapSearch PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS PcapSearch EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install(TARGETS PcapSearch EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples) endif() diff --git a/Examples/PcapSplitter/CMakeLists.txt b/Examples/PcapSplitter/CMakeLists.txt index 38173452a6..8ae4ee91a0 100644 --- a/Examples/PcapSplitter/CMakeLists.txt +++ b/Examples/PcapSplitter/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(PcapSplitter PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS PcapSplitter EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS PcapSplitter + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/PfRingExample-FilterTraffic/CMakeLists.txt b/Examples/PfRingExample-FilterTraffic/CMakeLists.txt index 9b8c9faae2..bcc384b99b 100644 --- a/Examples/PfRingExample-FilterTraffic/CMakeLists.txt +++ b/Examples/PfRingExample-FilterTraffic/CMakeLists.txt @@ -5,5 +5,9 @@ target_link_libraries(PfRingTrafficFilter PUBLIC PcapPlusPlus::Pcap++) set_target_properties(PfRingTrafficFilter PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS PfRingTrafficFilter EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS PfRingTrafficFilter + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/SSLAnalyzer/CMakeLists.txt b/Examples/SSLAnalyzer/CMakeLists.txt index 8503224c4c..b82835a1d0 100644 --- a/Examples/SSLAnalyzer/CMakeLists.txt +++ b/Examples/SSLAnalyzer/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(SSLAnalyzer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS SSLAnalyzer EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS SSLAnalyzer + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/TLSFingerprinting/CMakeLists.txt b/Examples/TLSFingerprinting/CMakeLists.txt index f79ba5adcb..3d673b4bf9 100644 --- a/Examples/TLSFingerprinting/CMakeLists.txt +++ b/Examples/TLSFingerprinting/CMakeLists.txt @@ -13,5 +13,9 @@ set_target_properties( ) if(PCAPPP_INSTALL) - install(TARGETS TLSFingerprinting EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS TLSFingerprinting + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/TcpReassembly/CMakeLists.txt b/Examples/TcpReassembly/CMakeLists.txt index d5b5835068..4e8ddce11b 100644 --- a/Examples/TcpReassembly/CMakeLists.txt +++ b/Examples/TcpReassembly/CMakeLists.txt @@ -10,5 +10,9 @@ endif() set_target_properties(TcpReassembly PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS TcpReassembly EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS TcpReassembly + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Examples/XdpExample-FilterTraffic/CMakeLists.txt b/Examples/XdpExample-FilterTraffic/CMakeLists.txt index 16d1a3a48f..664d0fd7ba 100644 --- a/Examples/XdpExample-FilterTraffic/CMakeLists.txt +++ b/Examples/XdpExample-FilterTraffic/CMakeLists.txt @@ -5,5 +5,9 @@ target_link_libraries(XdpTrafficFilter PUBLIC PcapPlusPlus::Pcap++) set_target_properties(XdpTrafficFilter PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PCAPPP_BINARY_EXAMPLES_DIR}") if(PCAPPP_INSTALL) - install(TARGETS XdpTrafficFilter EXPORT PcapPlusPlusTargets RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR}) + install( + TARGETS XdpTrafficFilter + EXPORT PcapPlusPlusTargets + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT examples + ) endif() diff --git a/Packet++/CMakeLists.txt b/Packet++/CMakeLists.txt index 01967a43a6..de17c978f1 100644 --- a/Packet++/CMakeLists.txt +++ b/Packet++/CMakeLists.txt @@ -183,10 +183,10 @@ if(PCAPPP_INSTALL) install( TARGETS Packet++ EXPORT PcapPlusPlusTargets - ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} - LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} - RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} + ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT devel + LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT runtime + PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} COMPONENT devel + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT runtime ) endif() diff --git a/Pcap++/CMakeLists.txt b/Pcap++/CMakeLists.txt index 2ffb0c3ab7..aca2396495 100644 --- a/Pcap++/CMakeLists.txt +++ b/Pcap++/CMakeLists.txt @@ -117,10 +117,10 @@ if(PCAPPP_INSTALL) install( TARGETS Pcap++ EXPORT PcapPlusPlusTargets - ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} - LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} - RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} + ARCHIVE DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT devel + LIBRARY DESTINATION ${PCAPPP_INSTALL_LIBDIR} COMPONENT runtime + PUBLIC_HEADER DESTINATION ${PCAPPP_INSTALL_INCLUDEDIR} COMPONENT devel + RUNTIME DESTINATION ${PCAPPP_INSTALL_BINDIR} COMPONENT runtime ) endif()