From edea64442c76124802e6ae4e1e048f05367e9938 Mon Sep 17 00:00:00 2001 From: Yannis Guyon Date: Mon, 19 Jul 2021 18:46:03 +0200 Subject: [PATCH] libwebp/CMake: Add to webp incl This way target_link_libraries(my_target PUBLIC webp) is enough, no need to add include directories explicitly for the public headers such as src/webp/decode.h. This matches the /usr/include/webp/decode.h installation folder path prefix (#include "webp/decode.h"). See https://bugs.chromium.org/p/webp/issues/detail?id=532 The target_include_directories() calls for cwebp, dwebp etc. may be unnecessary now and may be removed in another patch. Change-Id: I2c85218920ffc35ebec23e0dd239f71e29add23b --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d64f676b..bd1bebb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,10 +283,12 @@ if(XCODE) libwebp_add_stub_file(webp) endif() target_link_libraries(webp ${WEBP_DEP_LIBRARIES}) -target_include_directories(webp - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - PUBLIC $) +target_include_directories( + webp + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC $ + $) set_target_properties( webp PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\