+# 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: OPJ_PREFIX to whatever you like
+# e.g.:
+# SET(OPJ_PREFIX "gdcm")
+# Also if you want to test (CTest driven) you need to define :
+# OPJ_STANDALONE to 1, e.g
+# OPJ_STANDALONE:BOOL=1
PROJECT(OPENJPEG C)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
#-----------------------------------------------------------------------------
# OPENJPEG version number, usefull for packaging and doxygen doc:
+ : added
January 25, 2006
+! [Mathieu Malaterre] Add a lot of comments on the CMake build system
! [Mathieu Malaterre] Fix MINGW32 and BORLAND compilation problems.
January 25, 2006
SET (TRIGGER_SITE
"http://${DROP_SITE}/cgi-bin/Submit-Public-TestingResults.cgi")
+# Not used right now, since on public:
+# Project Home Page
+SET (PROJECT_URL "http://www.openjpeg.org")
+
+# Dart server configuration
+#SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/openjpeg-rollup-dashboard.sh")
+SET (CVS_WEB_URL "http://euterpe.tele.ucl.ac.be/cgi-bin/viewcvs.cgi/")
+SET (CVS_WEB_CVSROOT "OpenJPEG")
+
FOREACH(exe j2k_to_image image_to_j2k)
ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
+ # On unix you need to link to the math library:
IF(UNIX)
TARGET_LINK_LIBRARIES(${exe} -lm)
ENDIF(UNIX)
INCLUDE_REGULAR_EXPRESSION("^.*$")
-# Create the lib
+# Defines the source code for the library
SET(openjpeg_SRCS
bio.c
cio.c
tgt.c
)
+# Handle the dllimport/dllexport for building shared lib on Win32
IF (WIN32)
IF (BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DOPJ_SHARED)
ENDIF (BUILD_SHARED_LIBS)
ENDIF (WIN32)
+# Create the library
ADD_LIBRARY(${OPJ_PREFIX}openjpeg ${openjpeg_SRCS})