openjpeg2: add install interface include directory (backport)

This commit is contained in:
Mehdi Chinoune
2021-09-24 06:43:54 +01:00
parent cf58d08112
commit 58a210906f
2 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
From 5c2053950eb4c2c76f17deefd35f5c49abf0232e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <anonymous.maarten@gmail.com>
Date: Sun, 1 Aug 2021 20:56:40 +0200
Subject: [PATCH] cmake: add install interface include directory
---
src/lib/openjp2/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
index 9f79b9c31..48259044a 100644
--- a/src/lib/openjp2/CMakeLists.txt
+++ b/src/lib/openjp2/CMakeLists.txt
@@ -97,12 +97,14 @@ else()
add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
+ target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
else()
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
endif()
endif()
+target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
if(UNIX)
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
endif()

View File

@@ -4,7 +4,7 @@ _realname=openjpeg
pkgbase=mingw-w64-${_realname}2
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}2"
pkgver=2.4.0
pkgrel=1
pkgrel=2
pkgdesc="An open source JPEG 2000 codec (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
@@ -26,7 +26,8 @@ source=(${_realname}-${pkgver}.tar.gz::https://github.com/uclouvain/openjpeg/arc
0004-mingw-disable-java.patch
0005-sock-jpip.all.patch
0006-openjpeg-2.1.0-stdcall-for-all-win.patch
0007-workaround-jp3d-opj_free-link.patch)
0007-workaround-jp3d-opj_free-link.patch
0008-cmake-add-install-interface-include-directory.patch)
sha256sums=('8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d'
'3f3bde353ca3432f157258164c5e3c345af82ca3a9d5a68f815c3030b01cbc32'
'31b2cc6824b07b705ba1c05b38904c8c4fc6ba39acefebda3e6ec85dbef9a174'
@@ -34,7 +35,8 @@ sha256sums=('8702ba68b442657f11aaeb2b338443ca8d5fb95b0d845757968a7be31ef7f16d'
'adade9b29e4292b642d547644e26fab6e193bbfe31d25f07d89a8c35e4d0993d'
'9df169f03e6e69cba0d7d33592f9eba373a02cd9554b456d3eb9ff3d9135391b'
'e8c375faa317c819174b50aa43b6be61c108872661b014738c4a0cfa95aac919'
'056676ae6fde36c4f849b0c282bf49a4c63aceaf63d6ee114b4336a240de79bf')
'056676ae6fde36c4f849b0c282bf49a4c63aceaf63d6ee114b4336a240de79bf'
'b99cfedafbd03687006fbe84a7d74c93aaace40e25250d8a2910d50bc2740cd7')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@@ -65,7 +67,11 @@ prepare() {
#patch -p1 -i ${srcdir}/0006-openjpeg-2.1.0-stdcall-for-all-win.patch
# Workaround, src/bin/jp3d is removed in upstream
patch -p1 -i "${srcdir}/0007-workaround-jp3d-opj_free-link.patch"
apply_patch_with_msg \
0007-workaround-jp3d-opj_free-link.patch
apply_patch_with_msg \
0008-cmake-add-install-interface-include-directory.patch
}
build() {