mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-19 23:36:45 +02:00
libwebp/CMake: Add <BUILD_INTERFACE> 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
This commit is contained in:
parent
a89a3230c9
commit
edea64442c
@ -283,10 +283,12 @@ if(XCODE)
|
|||||||
libwebp_add_stub_file(webp)
|
libwebp_add_stub_file(webp)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(webp ${WEBP_DEP_LIBRARIES})
|
target_link_libraries(webp ${WEBP_DEP_LIBRARIES})
|
||||||
target_include_directories(webp
|
target_include_directories(
|
||||||
|
webp
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
PUBLIC $<INSTALL_INTERFACE:include>)
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||||
|
$<INSTALL_INTERFACE:include>)
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
webp
|
webp
|
||||||
PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\
|
PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/decode.h;\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user