summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2021-01-07 14:09:50 +0100
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2021-01-07 14:09:50 +0100
commit14f4c27e7c91f745a1dda9991b5deea3cbef2072 (patch)
treeaaf75374ec18d1b1b9854bca8fba9cf9d9bf57af
parent0782cd075d7e9678bf1cb448c1f3d048fabe4489 (diff)
Revert "Use INC_DIR for OPENJPEG_INCLUDE_DIRS (fixes uclouvain#1174)"
This reverts commit 65586374d639cfc0104419992f9022174b412594 which breaks cross-compilation of poppler under buildroot (because of DESTDIR usage).
-rw-r--r--cmake/OpenJPEGConfig.cmake.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
index 8a726697..2925108a 100644
--- a/cmake/OpenJPEGConfig.cmake.in
+++ b/cmake/OpenJPEGConfig.cmake.in
@@ -27,8 +27,12 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
# This is an install tree
include(${SELF_DIR}/OpenJPEGTargets.cmake)
+ # We find a relative path from the PKG directory to header files.
+ set(PKG_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_PACKAGE_DIR@")
set(INC_DIR "@CMAKE_INSTALL_PREFIX@/@OPENJPEG_INSTALL_INCLUDE_DIR@")
- get_filename_component(OPENJPEG_INCLUDE_DIRS "${INC_DIR}" ABSOLUTE)
+ file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
+
+ get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
else()
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)