3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-23 04:43:42 +01:00

[cmake] Be sure fill INTERFACE_INCLUDE_DIRECTORIES for installed library targets

This commit is contained in:
Nils Wentzell 2020-04-24 17:50:26 -04:00
parent 1959a60d15
commit 3f71381f1b

View File

@ -4,9 +4,10 @@ add_library(app4triqs_c ${sources})
# Link against triqs and enable warnings # Link against triqs and enable warnings
target_link_libraries(app4triqs_c PUBLIC triqs PRIVATE project_warnings) target_link_libraries(app4triqs_c PUBLIC triqs PRIVATE project_warnings)
# Configure compilation # Configure target and compilation
target_compile_options(app4triqs_c PUBLIC -fPIC) target_compile_options(app4triqs_c PUBLIC -fPIC)
target_include_directories(app4triqs_c PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/c++>) target_include_directories(app4triqs_c PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/c++>)
target_include_directories(app4triqs_c SYSTEM INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
target_compile_definitions(app4triqs_c PUBLIC target_compile_definitions(app4triqs_c PUBLIC
APP4TRIQS_GIT_HASH=${PROJECT_GIT_HASH} APP4TRIQS_GIT_HASH=${PROJECT_GIT_HASH}
TRIQS_GIT_HASH=${TRIQS_GIT_HASH} TRIQS_GIT_HASH=${TRIQS_GIT_HASH}