Skip to content

Commit

Permalink
Update CMakeLists to support dynamic inclusion of directories
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedFatthy1040 committed Nov 28, 2024
1 parent 2a6dacc commit 3050471
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<JOIN:$<TARGET_PROPERTY:xeus-cpp,INCLUDE_DIRECTORIES>,:>)

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}\"")

0 comments on commit 3050471

Please sign in to comment.