From 1a6307c8487fc9e869761905dcc8112fd8e96041 Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Tue, 28 Jul 2020 11:55:14 +0300 Subject: [PATCH] headers hell fight --- contrib/cyrus-sasl-cmake/CMakeLists.txt | 16 ++++++++++++++++ contrib/krb5-cmake/CMakeLists.txt | 5 +++++ contrib/krb5-cmake/krb5/krb5.h | 12 ------------ contrib/librdkafka-cmake/CMakeLists.txt | 1 + 4 files changed, 22 insertions(+), 12 deletions(-) delete mode 100644 contrib/krb5-cmake/krb5/krb5.h diff --git a/contrib/cyrus-sasl-cmake/CMakeLists.txt b/contrib/cyrus-sasl-cmake/CMakeLists.txt index 3b608220fd6..5003c9a21db 100644 --- a/contrib/cyrus-sasl-cmake/CMakeLists.txt +++ b/contrib/cyrus-sasl-cmake/CMakeLists.txt @@ -21,6 +21,10 @@ target_sources(${CYRUS_SASL_LIBRARY} PRIVATE ) target_include_directories(${CYRUS_SASL_LIBRARY} PUBLIC + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_include_directories(${CYRUS_SASL_LIBRARY} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} # for config.h ${CYRUS_SASL_SOURCE_DIR}/plugins ${CYRUS_SASL_SOURCE_DIR} @@ -48,6 +52,18 @@ target_compile_definitions(${CYRUS_SASL_LIBRARY} PUBLIC LIBSASL_EXPORTS=1 ) +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sasl) + +file(COPY + ${CYRUS_SASL_SOURCE_DIR}/include/sasl.h + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/sasl +) + +file(COPY + ${CYRUS_SASL_SOURCE_DIR}/include/prop.h + DESTINATION ${CMAKE_CURRENT_BINARY_DIR} +) + target_link_libraries(${CYRUS_SASL_LIBRARY} PUBLIC ${KRB5_LIBRARY} ) diff --git a/contrib/krb5-cmake/CMakeLists.txt b/contrib/krb5-cmake/CMakeLists.txt index b7ab39958e3..815045d82d8 100644 --- a/contrib/krb5-cmake/CMakeLists.txt +++ b/contrib/krb5-cmake/CMakeLists.txt @@ -606,6 +606,10 @@ file(COPY ${KRB5_SOURCE_DIR}/lib/gssapi/krb5/gssapi_krb5.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/gssapi/ ) +file(COPY ${KRB5_SOURCE_DIR}/util/et/com_err.h + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/ +) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/krb5 ) @@ -628,6 +632,7 @@ add_custom_command( ) + target_include_directories(krb5 PUBLIC ${KRB5_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include diff --git a/contrib/krb5-cmake/krb5/krb5.h b/contrib/krb5-cmake/krb5/krb5.h deleted file mode 100644 index a75419dbd9c..00000000000 --- a/contrib/krb5-cmake/krb5/krb5.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef KRB5_KRB5_H_INCLUDED -#define KRB5_KRB5_H_INCLUDED - -#include "krb5/krb5.hin" -#include "lib/krb5/error_tables/krb5_err.h" -#include "lib/krb5/error_tables/k5e1_err.h" -#include "lib/krb5/error_tables/kdb5_err.h" -#include "lib/krb5/error_tables/kv5m_err.h" -#include "lib/krb5/error_tables/krb524_err.h" -#include "lib/krb5/error_tables/asn1_err.h" - -#endif /* KRB5_KRB5_H_INCLUDED */ diff --git a/contrib/librdkafka-cmake/CMakeLists.txt b/contrib/librdkafka-cmake/CMakeLists.txt index f1790ff0d64..4a67ebadba6 100644 --- a/contrib/librdkafka-cmake/CMakeLists.txt +++ b/contrib/librdkafka-cmake/CMakeLists.txt @@ -87,6 +87,7 @@ endif() add_library(rdkafka ${SRCS}) target_compile_options(rdkafka PRIVATE -fno-sanitize=undefined) # target_include_directories(rdkafka SYSTEM PUBLIC include) +target_include_directories(rdkafka SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) # for "librdkafka/rdkafka.h" target_include_directories(rdkafka SYSTEM PUBLIC ${RDKAFKA_SOURCE_DIR}) # Because weird logic with "include_next" is used. target_include_directories(rdkafka SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/auxdir) # for "../config.h" target_include_directories(rdkafka SYSTEM PRIVATE ${ZSTD_INCLUDE_DIR}/common) # Because wrong path to "zstd_errors.h" is used.