summaryrefslogtreecommitdiff
path: root/cmake/OpenJPEGConfig.cmake.in
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-09-28 08:11:41 +0000
commitd518970039a19a2a9b6d2bdd592cc88a43897bbb (patch)
tree57bac2cf7e63e9352228231062763baac627563c /cmake/OpenJPEGConfig.cmake.in
parent8363a6ab1e031bb4b2e40a92e56efd40fdab1aa1 (diff)
[trunk] Start FolderReorgProposal task
Update issue 177
Diffstat (limited to 'cmake/OpenJPEGConfig.cmake.in')
-rw-r--r--cmake/OpenJPEGConfig.cmake.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/cmake/OpenJPEGConfig.cmake.in b/cmake/OpenJPEGConfig.cmake.in
new file mode 100644
index 00000000..b20294ca
--- /dev/null
+++ b/cmake/OpenJPEGConfig.cmake.in
@@ -0,0 +1,48 @@
+#-----------------------------------------------------------------------------
+#
+# 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.
+set(OPENJPEG_MAJOR_VERSION "@OPENJPEG_VERSION_MAJOR@")
+set(OPENJPEG_MINOR_VERSION "@OPENJPEG_VERSION_MINOR@")
+set(OPENJPEG_BUILD_VERSION "@OPENJPEG_VERSION_BUILD@")
+
+# The libraries.
+set(OPENJPEG_LIBRARIES "@OPENJPEG_LIBRARY_NAME@")
+
+# The CMake macros dir.
+set(OPENJPEG_CMAKE_DIR "@OPENJPEG_INSTALL_PACKAGE_DIR@")
+
+# The configuration options.
+set(OPENJPEG_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
+
+# The "use" file.
+set(OPENJPEG_USE_FILE "@OPENJPEG_USE_FILE_CONFIG@")
+
+get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+if(EXISTS ${SELF_DIR}/OpenJPEGTargets.cmake)
+ # This is an install tree
+ include(${SELF_DIR}/OpenJPEGTargets.cmake)
+ get_filename_component(OPENJPEG_INCLUDE_ROOT "${SELF_DIR}/../../@OPENJPEG_INSTALL_INCLUDE_DIR@" ABSOLUTE)
+ set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_ROOT})
+
+else()
+ if(EXISTS ${SELF_DIR}/OpenJPEGExports.cmake)
+ # This is a build tree
+ set( OPENJPEG_INCLUDE_DIRS @OPENJPEG_INCLUDE_PATH@)
+
+ include(${SELF_DIR}/OpenJPEGExports.cmake)
+
+ else()
+ message(FATAL_ERROR "ooops")
+ endif()
+endif()
+
+set(OPENJPEG_USE_FILE ${SELF_DIR}/UseOPENJPEG.cmake)
+
+# Backward compatible part:
+set(OPENJPEG_FOUND TRUE)
+