diff options
author | Andreas Schuh <andreas.schuh.84@gmail.com> | 2015-03-24 18:54:30 +0000 |
---|---|---|
committer | Andreas Schuh <andreas.schuh.84@gmail.com> | 2015-03-24 18:54:30 +0000 |
commit | a9b983a827e530cab88639b3ce105f8d2cb2fdde (patch) | |
tree | cb26ffe44f72ae8a1fdc17e54069399818ed3e03 /CMakeLists.txt | |
parent | f9e1ffaa3906696c056fdd2a398d3dbf1e8060d7 (diff) | |
download | gflags-a9b983a827e530cab88639b3ce105f8d2cb2fdde.tar.gz gflags-a9b983a827e530cab88639b3ce105f8d2cb2fdde.tar.bz2 gflags-a9b983a827e530cab88639b3ce105f8d2cb2fdde.zip |
#104 Fix library include directories settings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d00044..4d5d843 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,15 +319,14 @@ foreach (TYPE IN ITEMS STATIC SHARED) if (BUILD_gflags${opts}_LIB) add_library (gflags${opts}-${type} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS}) if (COMMAND target_include_directories) + set (include_dirs "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>") + if (INSTALL_HEADERS) + list (APPEND include_dirs "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>") + endif () target_include_directories (gflags${opts}-${type} - PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>" + PUBLIC "${include_dirs}" PRIVATE "${PROJECT_SOURCE_DIR}/src;${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}" ) - if (INSTALL_HEADERS) - target_include_directories (gflags${opts}-${type} - PUBLIC "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>" - ) - endif () endif () if (opts MATCHES "nothreads") set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS") |