From 2414d3195108a4d97da788209e4f2975d9ed0fa1 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Tue, 22 Oct 2019 15:42:06 +0100 Subject: [PATCH] Properly sort out exporting the include directory for in-tree builds but not for out of tree builds. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d6f635f..4a54c269 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,7 +464,9 @@ set_property(TARGET getdns_objects PROPERTY C_STANDARD 11) # Static library version of main library. add_library(getdns STATIC $) -target_include_directories(getdns PUBLIC src) +target_include_directories(getdns PUBLIC + "$" + ) target_link_libraries(getdns PUBLIC OpenSSL::SSL @@ -476,7 +478,9 @@ set_target_properties(getdns PROPERTIES OUTPUT_NAME getdns${static_lib_suffix}) # Shared library version of main library. add_library(getdns_shared SHARED $) -target_include_directories(getdns PUBLIC src) +target_include_directories(getdns_shared PUBLIC + "$" + ) target_link_libraries(getdns_shared PUBLIC OpenSSL::SSL @@ -529,14 +533,12 @@ add_executable(getdns_query src/tools/getdns_query.c) if (NOT HAVE_GETTIMEOFDAY) target_sources(getdns_query PRIVATE src/compat/gettimeofday.c) endif () -target_include_directories(getdns_query PRIVATE getdns) target_link_libraries(getdns_query PRIVATE getdns) set_property(TARGET getdns_query PROPERTY C_STANDARD 11) add_executable(getdns_server_mon src/tools/getdns_server_mon.c) target_include_directories(getdns_server_mon PRIVATE - getdns OpenSSL:SSL OpenSSL:Crypto )