From e46a342e1740db5c3e1eaf0fbf3289ad5e44030d Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 12 Jun 2020 14:57:41 -0700 Subject: [PATCH] ensure version.h is in the include path --- core/CMakeLists.txt | 5 +++++ osdep/CMakeLists.txt | 10 ++++++++++ serviceiocore/CMakeLists.txt | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 5e033a469..02122d690 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -102,4 +102,9 @@ endif(WIN32) add_executable(zt_core_tests Tests.h Tests.cpp) target_compile_definitions(zt_core_tests PRIVATE ZT_ENABLE_TESTS=1 ZT_STANDALONE_TESTS=1) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + ${CMAKE_BINARY_DIR}/core +) target_link_libraries(zt_core_tests zt_core ${libs}) diff --git a/osdep/CMakeLists.txt b/osdep/CMakeLists.txt index a0e6c9d81..8411a2df9 100644 --- a/osdep/CMakeLists.txt +++ b/osdep/CMakeLists.txt @@ -43,8 +43,18 @@ endif(WIN32) add_library(${PROJECT_NAME} STATIC ${src} ${headers}) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + ${CMAKE_BINARY_DIR}/core +) if(APPLE) add_executable(MacEthernetTapAgent MacEthernetTapAgent.c MacEthernetTapAgent.h) target_include_directories(MacEthernetTapAgent PRIVATE ${CMAKE_BINARY_DIR}) + target_include_directories( + MacEthernetTapAgent + PUBLIC + ${CMAKE_BINARY_DIR}/core + ) endif(APPLE) diff --git a/serviceiocore/CMakeLists.txt b/serviceiocore/CMakeLists.txt index faf78f97e..8e30b57f6 100644 --- a/serviceiocore/CMakeLists.txt +++ b/serviceiocore/CMakeLists.txt @@ -11,3 +11,8 @@ set(headers add_library(${PROJECT_NAME} STATIC ${src} ${headers}) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + ${CMAKE_BINARY_DIR}/core +) \ No newline at end of file