diff options
author | Anonymous Maarten <madebr@users.noreply.github.com> | 2022-05-12 09:50:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 10:50:48 +0300 |
commit | 9801a2c5d6c67c467ffad676ac301379bb877fc3 (patch) | |
tree | efbb838c5b87479ccb1070ce343ee9103d5d5b90 /CMakeLists.txt | |
parent | f09b2555acf46810184c8cdccdb274b9c20e83eb (diff) | |
download | brotli-9801a2c5d6c67c467ffad676ac301379bb877fc3.zip brotli-9801a2c5d6c67c467ffad676ac301379bb877fc3.tar.gz brotli-9801a2c5d6c67c467ffad676ac301379bb877fc3.tar.bz2 |
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 983e839..e86b13b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) |