From 9801a2c5d6c67c467ffad676ac301379bb877fc3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 12 May 2022 09:50:48 +0200 Subject: 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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 "$") endforeach() if(NOT BROTLI_EMSCRIPTEN) -- cgit v1.1