added cmake files to the project
[openjpeg.git] / CMakeLists.txt
1 PROJECT(OPENJPEG C)
2
3 #-----------------------------------------------------------------------------
4 # OPENJPEG version number, usefull for packaging and doxygen doc:
5 SET(OPENJPEG_MAJOR_VERSION 1)
6 SET(OPENJPEG_MINOR_VERSION 0)
7 SET(OPENJPEG_BUILD_VERSION 0)
8 SET(OPENJPEG_VERSION
9   "${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
10
11 #-----------------------------------------------------------------------------
12 # OpenJPEG build configuration options.
13 OPTION(BUILD_SHARED_LIBS "Build OpenJPEG with shared libraries." OFF)
14
15 #-----------------------------------------------------------------------------
16 # For the codec...
17 OPTION(BUILD_EXAMPLES "Build the Examples (codec...)." OFF)
18
19 #-----------------------------------------------------------------------------
20 # Always build the library
21 SUBDIRS(
22   libopenjpeg
23   )
24 #-----------------------------------------------------------------------------
25 # Build example only if requested
26 IF(BUILD_EXAMPLES)
27   SUBDIRS(codec)
28 ENDIF(BUILD_EXAMPLES)
29
30 #-----------------------------------------------------------------------------
31 # For openjpeg team if they ever want Dart+CMake
32 IF(OPJ_STANDALONE)
33   INCLUDE(Dart)
34   MARK_AS_ADVANCED(BUILD_TESTING DART_ROOT TCL_TCLSH)
35   IF(BUILD_TESTING)
36     ENABLE_TESTING()
37   ENDIF(BUILD_TESTING)
38 ENDIF(OPJ_STANDALONE)
39 # TODO, technically we should add tests, e.g:
40 # http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
41