Commit a9b983a8 authored by Andreas Schuh's avatar Andreas Schuh

#104 Fix library include directories settings

parent f9e1ffaa
...@@ -319,16 +319,15 @@ foreach (TYPE IN ITEMS STATIC SHARED) ...@@ -319,16 +319,15 @@ foreach (TYPE IN ITEMS STATIC SHARED)
if (BUILD_gflags${opts}_LIB) if (BUILD_gflags${opts}_LIB)
add_library (gflags${opts}-${type} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS}) add_library (gflags${opts}-${type} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS})
if (COMMAND target_include_directories) if (COMMAND target_include_directories)
target_include_directories (gflags${opts}-${type} set (include_dirs "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>")
PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>"
PRIVATE "${PROJECT_SOURCE_DIR}/src;${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}"
)
if (INSTALL_HEADERS) if (INSTALL_HEADERS)
list (APPEND include_dirs "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
endif ()
target_include_directories (gflags${opts}-${type} target_include_directories (gflags${opts}-${type}
PUBLIC "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>" PUBLIC "${include_dirs}"
PRIVATE "${PROJECT_SOURCE_DIR}/src;${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}"
) )
endif () endif ()
endif ()
if (opts MATCHES "nothreads") if (opts MATCHES "nothreads")
set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS") set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS")
else () else ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment