From 61e353d652275d94e896e70cf5e6d2d193688d9f Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Wed, 25 Jan 2006 16:32:48 +0000 Subject: [PATCH] STYLE: Add a lot of comments for the CMake build system --- CMakeLists.txt | 13 +++++++++++++ ChangeLog | 1 + DartConfig.cmake | 9 +++++++++ codec/CMakeLists.txt | 1 + libopenjpeg/CMakeLists.txt | 4 +++- 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efabbe95..a2b8d36e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,17 @@ +# 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: diff --git a/ChangeLog b/ChangeLog index a8103cfc..37136a6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ What's New for OpenJPEG + : 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 diff --git a/DartConfig.cmake b/DartConfig.cmake index 421763f5..ec6b0f91 100644 --- a/DartConfig.cmake +++ b/DartConfig.cmake @@ -9,3 +9,12 @@ SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi") 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") + diff --git a/codec/CMakeLists.txt b/codec/CMakeLists.txt index ee496e33..3ed8bedd 100644 --- a/codec/CMakeLists.txt +++ b/codec/CMakeLists.txt @@ -34,6 +34,7 @@ INCLUDE_DIRECTORIES( 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) diff --git a/libopenjpeg/CMakeLists.txt b/libopenjpeg/CMakeLists.txt index 08a072ed..bd3dcbc5 100644 --- a/libopenjpeg/CMakeLists.txt +++ b/libopenjpeg/CMakeLists.txt @@ -1,5 +1,5 @@ INCLUDE_REGULAR_EXPRESSION("^.*$") -# Create the lib +# Defines the source code for the library SET(openjpeg_SRCS bio.c cio.c @@ -23,6 +23,7 @@ SET(openjpeg_SRCS tgt.c ) +# Handle the dllimport/dllexport for building shared lib on Win32 IF (WIN32) IF (BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DOPJ_SHARED) @@ -31,5 +32,6 @@ IF (WIN32) ENDIF (BUILD_SHARED_LIBS) ENDIF (WIN32) +# Create the library ADD_LIBRARY(${OPJ_PREFIX}openjpeg ${openjpeg_SRCS})