+# Main CMakeLists.txt to build the OpenJPEG project using CMake (www.cmake.org)
+# Written by Mathieu Malaterre
+
+# This CMake project will by default create a library called openjpeg
+# But if you want to use this project within your own (CMake) project
+# you will eventually like to prefix the library to avoid linking confusion
+# For this purpose you can define a CMake var: OPENJPEG_NAMESPACE to whatever you like
+# e.g.:
+# SET(OPENJPEG_NAMESPACE "GDCMOPENJPEG")
+CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+
+IF(NOT OPENJPEG_NAMESPACE)
+ SET(OPENJPEG_NAMESPACE "OPENJPEG")
+ SET(OPENJPEG_STANDALONE 1)
+ENDIF(NOT OPENJPEG_NAMESPACE)
+# In all cases:
+STRING(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME)
+
+PROJECT(${OPENJPEG_NAMESPACE} C)
+
+# Do full dependency headers.
+INCLUDE_REGULAR_EXPRESSION("^.*$")