-#-----------------------------------------------------------------------------
-# Always build the library
-INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
-SUBDIRS(libopenjpeg)
-
-#-----------------------------------------------------------------------------
-# Build CODEC executables ?
-OPTION(BUILD_CODEC "Build the CODEC executables" ON)
-IF(BUILD_CODEC)
- SUBDIRS(codec)
-ENDIF(BUILD_CODEC)
-
-#-----------------------------------------------------------------------------
-# Build MJ2 executables ?
-OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF)
-IF(BUILD_MJ2)
- SUBDIRS(mj2)
-ENDIF(BUILD_MJ2)
-
-#-----------------------------------------------------------------------------
-# Build JPWL executables ?
-OPTION(BUILD_JPWL "Build the JPWL executables" OFF)
-IF(BUILD_JPWL)
- SUBDIRS(jpwl)
-ENDIF(BUILD_JPWL)
-
-#-----------------------------------------------------------------------------
-# Build JP3D executables ?
-OPTION(BUILD_JP3D "Build the JP3D executables" OFF)
-IF(BUILD_JP3D)
- SUBDIRS(jp3d)
-ENDIF(BUILD_JP3D)
-
-#-----------------------------------------------------------------------------
-# Build INDEXER_JPIP executables ?
-OPTION(BUILD_INDEXER_JPIP "Build the INDEXER_JPIP executables" OFF)
-IF(BUILD_INDEXER_JPIP)
- SUBDIRS(indexer_JPIP)
-ENDIF(BUILD_INDEXER_JPIP)
-
-#-----------------------------------------------------------------------------
-# Build DOCUMENTATION ?
-OPTION(BUILD_DOC "Build the doxygen documentation" OFF)
-IF(BUILD_DOC)
- SUBDIRS(doc)
-ENDIF(BUILD_DOC)
-
-#-----------------------------------------------------------------------------
-# For openjpeg team if they ever want CDash+CMake
-OPTION(BUILD_TESTING "Build the tests." OFF)
-IF(BUILD_TESTING)
- ENABLE_TESTING()
- INCLUDE(CTest)
-ENDIF(BUILD_TESTING)
-
-# Adding test with dataset from:
-# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
-# -> wget http://www.crc.ricoh.com/~gormish/jpeg2000conformance/j2kp4files_v1_5.zip
-# http://www.jpeg.org/jpeg2000guide/testimages/testimages.html
-#-----------------------------------------------------------------------------
-# Adding JPEG2000_CONFORMANCE_DATA_ROOT
-FIND_PATH(JPEG2000_CONFORMANCE_DATA_ROOT testimages.html
- ${OPENJPEG_SOURCE_DIR}/../jpeg2000testimages
- $ENV{JPEG2000_CONFORMANCE_DATA_ROOT}
-)
-