Revert "Use INC_DIR for OPENJPEG_INCLUDE_DIRS (fixes uclouvain#1174)"

This reverts commit 65586374d6 which
breaks cross-compilation of poppler under buildroot (because of
DESTDIR usage).
This commit is contained in:
Fabrice Fontaine 2021-01-07 14:09:50 +01:00
parent 0782cd075d
commit 14f4c27e7c
1 changed files with 5 additions and 1 deletions

View File

@ -27,8 +27,12 @@ if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
# This is an install tree # This is an install tree
include(${SELF_DIR}/OpenJPEGTargets.cmake) 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@") 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() else()
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake) if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)