mirror of https://github.com/getdnsapi/getdns.git
Add binary build dir as include interface for the getdns libraries.
Any library user will need that to find the getdns header files.
This commit is contained in:
parent
a46ded25b6
commit
07a074c1b1
|
@ -631,6 +631,7 @@ if (ENABLE_STATIC)
|
||||||
add_library(getdns STATIC $<TARGET_OBJECTS:getdns_objects>)
|
add_library(getdns STATIC $<TARGET_OBJECTS:getdns_objects>)
|
||||||
target_include_directories(getdns PUBLIC
|
target_include_directories(getdns PUBLIC
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
target_link_libraries(getdns
|
target_link_libraries(getdns
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -662,6 +663,7 @@ if (ENABLE_SHARED)
|
||||||
add_library(getdns_shared SHARED $<TARGET_OBJECTS:getdns_objects>)
|
add_library(getdns_shared SHARED $<TARGET_OBJECTS:getdns_objects>)
|
||||||
target_include_directories(getdns_shared PUBLIC
|
target_include_directories(getdns_shared PUBLIC
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
target_link_libraries(getdns_shared
|
target_link_libraries(getdns_shared
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -839,7 +841,6 @@ if (BUILD_GETDNS_QUERY)
|
||||||
if (NOT HAVE_GETTIMEOFDAY)
|
if (NOT HAVE_GETTIMEOFDAY)
|
||||||
target_sources(getdns_query PRIVATE src/compat/gettimeofday.c)
|
target_sources(getdns_query PRIVATE src/compat/gettimeofday.c)
|
||||||
endif ()
|
endif ()
|
||||||
target_include_directories(getdns_query PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(getdns_query PRIVATE getdns)
|
target_link_libraries(getdns_query PRIVATE getdns)
|
||||||
if (Libunbound_FOUND)
|
if (Libunbound_FOUND)
|
||||||
target_link_libraries(getdns_query PUBLIC Libunbound::Libunbound)
|
target_link_libraries(getdns_query PUBLIC Libunbound::Libunbound)
|
||||||
|
@ -849,7 +850,6 @@ endif ()
|
||||||
|
|
||||||
if (BUILD_GETDNS_SERVER_MON)
|
if (BUILD_GETDNS_SERVER_MON)
|
||||||
add_executable(getdns_server_mon src/tools/getdns_server_mon.c)
|
add_executable(getdns_server_mon src/tools/getdns_server_mon.c)
|
||||||
target_include_directories(getdns_server_mon PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(getdns_server_mon
|
target_link_libraries(getdns_server_mon
|
||||||
PUBLIC
|
PUBLIC
|
||||||
OpenSSL::SSL
|
OpenSSL::SSL
|
||||||
|
@ -878,7 +878,6 @@ if (BUILD_TESTING)
|
||||||
src/test/check_getdns_selectloop.c
|
src/test/check_getdns_selectloop.c
|
||||||
src/test/check_getdns.c
|
src/test/check_getdns.c
|
||||||
)
|
)
|
||||||
target_include_directories(check_getdns PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(check_getdns
|
target_link_libraries(check_getdns
|
||||||
PRIVATE
|
PRIVATE
|
||||||
getdns
|
getdns
|
||||||
|
@ -890,29 +889,24 @@ if (BUILD_TESTING)
|
||||||
src/test/tests_dict.c
|
src/test/tests_dict.c
|
||||||
src/test/testmessages.c
|
src/test/testmessages.c
|
||||||
)
|
)
|
||||||
target_include_directories(tests_dict PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(tests_dict PRIVATE getdns Check::Check)
|
target_link_libraries(tests_dict PRIVATE getdns Check::Check)
|
||||||
|
|
||||||
add_executable(tests_list
|
add_executable(tests_list
|
||||||
src/test/tests_list.c
|
src/test/tests_list.c
|
||||||
src/test/testmessages.c
|
src/test/testmessages.c
|
||||||
)
|
)
|
||||||
target_include_directories(tests_list PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(tests_list PRIVATE getdns Check::Check)
|
target_link_libraries(tests_list PRIVATE getdns Check::Check)
|
||||||
|
|
||||||
add_executable(tests_namespaces src/test/tests_namespaces.c)
|
add_executable(tests_namespaces src/test/tests_namespaces.c)
|
||||||
target_include_directories(tests_namespaces PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(tests_namespaces PRIVATE getdns Check::Check)
|
target_link_libraries(tests_namespaces PRIVATE getdns Check::Check)
|
||||||
|
|
||||||
add_executable(tests_stub_async
|
add_executable(tests_stub_async
|
||||||
src/test/tests_stub_async.c
|
src/test/tests_stub_async.c
|
||||||
src/test/testmessages.c
|
src/test/testmessages.c
|
||||||
)
|
)
|
||||||
target_include_directories(tests_stub_async PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(tests_stub_async PRIVATE getdns Check::Check)
|
target_link_libraries(tests_stub_async PRIVATE getdns Check::Check)
|
||||||
|
|
||||||
add_executable(tests_stub_sync src/test/tests_stub_sync.c)
|
add_executable(tests_stub_sync src/test/tests_stub_sync.c)
|
||||||
target_include_directories(tests_stub_sync PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
||||||
target_link_libraries(tests_stub_sync PRIVATE getdns Check::Check)
|
target_link_libraries(tests_stub_sync PRIVATE getdns Check::Check)
|
||||||
|
|
||||||
add_test(NAME test_noeventloop COMMAND check_getdns)
|
add_test(NAME test_noeventloop COMMAND check_getdns)
|
||||||
|
|
Loading…
Reference in New Issue