[libraw] Fix exported include dir (#32994)

This commit is contained in:
Kai Pastor 2023-08-07 18:20:06 +02:00 committed by GitHub
parent 48d0be929c
commit 9a2fae790b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,32 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 484e76b..adbcd10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,9 @@ if(MSVC)
add_definitions(-D_AFX_SECURE_NO_WARNINGS)
endif()
+# For variables in $<INSTALL_INTERFACE:...>
+include(GNUInstallDirs)
+
# -- Check dependencies --------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
@@ -489,7 +492,7 @@ endif()
target_include_directories(raw
PUBLIC
- $<INSTALL_INTERFACE:libraw>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libraw>
$<BUILD_INTERFACE:${LIBRAW_PATH}>)
target_link_libraries(raw PUBLIC ${MATH_LIBRARY})
@@ -558,7 +561,7 @@ set_target_properties(raw_r PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(raw_r PUBLIC ${MATH_LIBRARY})
target_include_directories(raw_r
PUBLIC
- $<INSTALL_INTERFACE:libraw>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libraw>
$<BUILD_INTERFACE:${LIBRAW_PATH}>)
if(WIN32)

View File

@ -14,6 +14,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
dependencies.patch
install-interface.patch
# Move the non-thread-safe library to manual-link. This is unfortunately needed
# because otherwise libraries that build on top of libraw have to choose.
fix-install.patch

View File

@ -1,7 +1,7 @@
{
"name": "libraw",
"version": "0.21.1",
"port-version": 1,
"port-version": 2,
"description": "raw image decoder library",
"homepage": "https://www.libraw.org",
"license": "LGPL-2.1-only OR CDDL-1.0",

View File

@ -4522,7 +4522,7 @@
},
"libraw": {
"baseline": "0.21.1",
"port-version": 1
"port-version": 2
},
"librdkafka": {
"baseline": "2.2.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ca8608b21d32cbd238b21eafc1ceb19ab91729b5",
"version": "0.21.1",
"port-version": 2
},
{
"git-tree": "1b27d2a7401506c017a98e896c3dee2db0a01bfa",
"version": "0.21.1",