From 30504714c4121fcb2f0c23805015bc40dea1db71 Mon Sep 17 00:00:00 2001 From: AhmedFatthy1040 Date: Thu, 28 Nov 2024 18:31:10 +0200 Subject: [PATCH] Update CMakeLists to support dynamic inclusion of directories --- test/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8ef68992..c3185063 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -67,3 +67,11 @@ target_link_libraries(test_xeus_cpp xeus-cpp doctest::doctest ${CMAKE_THREAD_LIB target_include_directories(test_xeus_cpp PRIVATE ${XEUS_CPP_INCLUDE_DIR}) add_custom_target(xtest COMMAND test_xeus_cpp DEPENDS test_xeus_cpp) + +set(XEUS_SEARCH_PATH $,:>) + +if (NOT EMSCRIPTEN) + set(XEUS_SEARCH_PATH "${XEUS_SEARCH_PATH}:${CMAKE_CURRENT_SOURCE_DIR}/src") +endif() + +target_compile_definitions(xeus-cpp PRIVATE "XEUS_SEARCH_PATH=\"${XEUS_SEARCH_PATH}\"") \ No newline at end of file