2010-06-29 21:09:10 +02:00
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# OPENJPEGConfig.cmake - CMake configuration file for external projects.
|
|
|
|
#
|
|
|
|
# This file is configured by OPENJPEG and used by the UseOPENJPEG.cmake
|
|
|
|
# module to load OPENJPEG's settings for an external project.
|
|
|
|
@OPENJPEG_CONFIG_INSTALL_ONLY@
|
|
|
|
# The OPENJPEG version number.
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_MAJOR_VERSION "@OPENJPEG_VERSION_MAJOR@")
|
|
|
|
set(OPENJPEG_MINOR_VERSION "@OPENJPEG_VERSION_MINOR@")
|
|
|
|
set(OPENJPEG_BUILD_VERSION "@OPENJPEG_VERSION_BUILD@")
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
# The libraries.
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_LIBRARIES "@OPENJPEG_LIBRARY_NAME@")
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
# The CMake macros dir.
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_CMAKE_DIR "@OPENJPEG_INSTALL_PACKAGE_DIR@")
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
# The configuration options.
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
# The "use" file.
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_USE_FILE "@OPENJPEG_USE_FILE_CONFIG@")
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
2010-08-11 10:47:21 +02:00
|
|
|
if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
|
2010-06-29 21:09:10 +02:00
|
|
|
# This is an install tree
|
2010-08-11 10:47:21 +02:00
|
|
|
include(${SELF_DIR}/OpenJPEGTargets.cmake)
|
2018-08-31 12:57:40 +02:00
|
|
|
|
|
|
|
# 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@")
|
|
|
|
file(RELATIVE_PATH PKG_TO_INC_RPATH "${PKG_DIR}" "${INC_DIR}")
|
|
|
|
|
|
|
|
get_filename_component(OPENJPEG_INCLUDE_DIRS "${SELF_DIR}/${PKG_TO_INC_RPATH}" ABSOLUTE)
|
2010-06-29 21:09:10 +02:00
|
|
|
|
2012-08-30 19:20:03 +02:00
|
|
|
else()
|
2010-08-11 10:47:21 +02:00
|
|
|
if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
|
2010-06-29 21:09:10 +02:00
|
|
|
# This is a build tree
|
2012-08-30 19:14:39 +02:00
|
|
|
set( OPENJPEG_INCLUDE_DIRS @OPENJPEG_INCLUDE_PATH@)
|
2010-06-29 21:09:10 +02:00
|
|
|
|
2010-08-11 10:47:21 +02:00
|
|
|
include(${SELF_DIR}/OpenJPEGExports.cmake)
|
2010-06-29 21:09:10 +02:00
|
|
|
|
2012-08-30 19:20:03 +02:00
|
|
|
else()
|
2010-06-29 21:09:10 +02:00
|
|
|
message(FATAL_ERROR "ooops")
|
2012-08-30 19:20:03 +02:00
|
|
|
endif()
|
|
|
|
endif()
|
2010-06-29 21:09:10 +02:00
|
|
|
|
|
|
|
set(OPENJPEG_USE_FILE ${SELF_DIR}/UseOPENJPEG.cmake)
|
|
|
|
|
|
|
|
# Backward compatible part:
|
2012-08-30 19:14:39 +02:00
|
|
|
set(OPENJPEG_FOUND TRUE)
|
2010-06-29 21:09:10 +02:00
|
|
|
|