headers hell fight

This commit is contained in:
Ilya Golshtein 2020-07-28 11:55:14 +03:00
parent d7d7283494
commit 1a6307c848
4 changed files with 22 additions and 12 deletions

View File

@ -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}
)

View File

@ -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

View File

@ -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 */

View File

@ -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.