From 643165fda6597a1fa5af7e155a6807702dc2d8e5 Mon Sep 17 00:00:00 2001 From: kamiccolo Date: Thu, 20 Jul 2023 16:08:47 +0300 Subject: [PATCH] Add PROJECT_ROOT/app for inclusion for getopt_tests --- samples/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 27266f28..1e7497a1 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -39,7 +39,7 @@ foreach(entry ${SAMPLES}) set_target_properties(${target} PROPERTIES COMPILE_FLAGS ${EXTRA_COMPILE_FLAGS}) list(APPEND APPLICATIONS ${target}) - target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR}/src) # To find unused.h + target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src) # To find enforce.hpp if ( NOT ${target} MATCHES ".*test.*") # don't install tests install( TARGETS ${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -54,20 +54,20 @@ endif() add_executable( getopt-test getopt-test.cpp ../app/getopt.cpp) list(APPEND APPLICATIONS getopt-test) target_include_directories(getopt-test PRIVATE - ${CMAKE_SOURCE_DIR}/app + ${PROJECT_SOURCE_DIR}/app ) # To find getopt.hpp add_executable( metacopy metacopy.cpp metacopy.hpp ../app/getopt.cpp) list(APPEND APPLICATIONS metacopy) target_include_directories(metacopy PRIVATE - ${CMAKE_SOURCE_DIR}/app + ${PROJECT_SOURCE_DIR}/app ) # To find getopt.hpp add_executable( path-test path-test.cpp ../app/getopt.cpp) list(APPEND APPLICATIONS path-test) set_target_properties( path-test PROPERTIES OUTPUT_NAME path-test ) target_include_directories(path-test PRIVATE - ${CMAKE_SOURCE_DIR}/app + ${PROJECT_SOURCE_DIR}/app ) # To find getopt.hpp install( TARGETS metacopy RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})