1 # Main CMakeLists.txt to build the OpenJPEG project using CMake (www.cmake.org)
2 # Written by Mathieu Malaterre
4 # This CMake project will by default create a library called openjpeg
5 # But if you want to use this project within your own (CMake) project
6 # you will eventually like to prefix the library to avoid linking confusion
7 # For this purpose you can define a CMake var: OPJ_PREFIX to whatever you like
9 # SET(OPJ_PREFIX "gdcm")
10 # Also if you want to test (CTest driven) you need to define :
11 # OPJ_STANDALONE to 1, e.g
12 # OPJ_STANDALONE:BOOL=1
14 CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
16 #-----------------------------------------------------------------------------
17 # OPENJPEG version number, usefull for packaging and doxygen doc:
18 SET(OPENJPEG_MAJOR_VERSION 1)
19 SET(OPENJPEG_MINOR_VERSION 0)
20 SET(OPENJPEG_BUILD_VERSION 0)
22 "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
24 #-----------------------------------------------------------------------------
25 # OpenJPEG build configuration options.
26 OPTION(BUILD_SHARED_LIBS "Build OpenJPEG with shared libraries." OFF)
28 #-----------------------------------------------------------------------------
30 OPTION(BUILD_EXAMPLES "Build the Examples (codec...)." OFF)
32 #-----------------------------------------------------------------------------
33 # Always build the library
37 #-----------------------------------------------------------------------------
38 # Build example only if requested
43 #-----------------------------------------------------------------------------
44 # For openjpeg team if they ever want Dart+CMake
47 MARK_AS_ADVANCED(BUILD_TESTING DART_ROOT TCL_TCLSH)
50 SET(BUILDNAME "OpenJPEG-${CMAKE_SYSTEM}-${CMAKE_C_COMPILER}" CACHE STRING "Name of build on the dashboard")
51 MARK_AS_ADVANCED(BUILDNAME)
55 # TODO, technically we should add tests, e.g:
56 # http://www.crc.ricoh.com/~gormish/jpeg2000conformance/