mirror of
https://github.com/google/brotli.git
synced 2024-11-09 13:40:06 +00:00
Wrap interface include directories with BUILD_INTERFACE generator expression (#966)
* Wrap interface include directories with BUILD_INTERFACE generator expression When exporting a CMake target using install(TARGETS) + install(EXPORT), CMake requires all include directories to be clean of build system directories. https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html This change also allows use of brotli as a CMake subproject and installing + exporting it. * Fix typo in generator expression
This commit is contained in:
parent
f09b2555ac
commit
9801a2c5d6
@ -197,7 +197,7 @@ foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS)
|
||||
if(NOT BROTLI_EMSCRIPTEN)
|
||||
set_target_properties(${lib} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}")
|
||||
set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${BROTLI_INCLUDE_DIRS}>")
|
||||
endforeach()
|
||||
|
||||
if(NOT BROTLI_EMSCRIPTEN)
|
||||
|
Loading…
Reference in New Issue
Block a user