Skip to content

Commit

Permalink
exclude examples and tests from packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Doekin committed Sep 28, 2024
1 parent 3919812 commit 80e8b0a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,19 @@ add_subdirectory(Packet++)
add_subdirectory(Pcap++)
add_subdirectory(Common++)

if(PCAPPP_BUILD_EXAMPLES)
set(PCAPPP_BINARY_EXAMPLES_DIR ${CMAKE_BINARY_DIR}/examples_bin)
add_subdirectory(Examples)
endif()
# exclude examples and tests from packaging
if(NOT PCAPPP_PACKAGE)
if(PCAPPP_BUILD_EXAMPLES)
set(PCAPPP_BINARY_EXAMPLES_DIR ${CMAKE_BINARY_DIR}/examples_bin)
add_subdirectory(Examples)
endif()

if(PCAPPP_BUILD_TESTS
OR PCAPPP_BUILD_FUZZERS
OR PCAPPP_BUILD_EXAMPLES)
include(CTest)
add_subdirectory(Tests)
if(PCAPPP_BUILD_TESTS
OR PCAPPP_BUILD_FUZZERS
OR PCAPPP_BUILD_EXAMPLES)
include(CTest)
add_subdirectory(Tests)
endif()
endif()

if(PCAPPP_INSTALL)
Expand Down

0 comments on commit 80e8b0a

Please sign in to comment.