Only include libidn/idn2 includes on building getdns objects if they are set.

This commit is contained in:
Jim Hague 2019-10-28 11:05:54 +00:00
parent 8867e14e8c
commit 7cf119fb6b
1 changed files with 6 additions and 2 deletions

View File

@ -520,8 +520,6 @@ target_include_directories(getdns_objects
src/yxml
${CMAKE_CURRENT_BINARY_DIR}
${LIBIDN_INCLUDE_DIR}
${LIBIDN2_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR}
)
if (NOT HAVE_SSL_DANE_ENABLE)
@ -529,6 +527,12 @@ if (NOT HAVE_SSL_DANE_ENABLE)
target_include_directories(getdns_objects PRIVATE src/ssl_dane)
set(USE_DANESSL 1)
endif ()
if (Libidn_FOUND)
target_include_directories(getdns_objects PRIVATE Libidn::Libidn)
endif ()
if (Libidn2_FOUND)
target_include_directories(getdns_objects PRIVATE Libidn2::Libidn2)
endif ()
# Don't compile separate objects for shared and static libraries.
# Yes, -fPIC is slightly suboptimal for static libraries, but it looks