added cmake files to the project
This commit is contained in:
parent
511d342a94
commit
e6aae96217
41
CMakeLists.txt
Normal file
41
CMakeLists.txt
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
PROJECT(OPENJPEG C)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# OPENJPEG version number, usefull for packaging and doxygen doc:
|
||||||
|
SET(OPENJPEG_MAJOR_VERSION 1)
|
||||||
|
SET(OPENJPEG_MINOR_VERSION 0)
|
||||||
|
SET(OPENJPEG_BUILD_VERSION 0)
|
||||||
|
SET(OPENJPEG_VERSION
|
||||||
|
"${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}")
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# OpenJPEG build configuration options.
|
||||||
|
OPTION(BUILD_SHARED_LIBS "Build OpenJPEG with shared libraries." OFF)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# For the codec...
|
||||||
|
OPTION(BUILD_EXAMPLES "Build the Examples (codec...)." OFF)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Always build the library
|
||||||
|
SUBDIRS(
|
||||||
|
libopenjpeg
|
||||||
|
)
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Build example only if requested
|
||||||
|
IF(BUILD_EXAMPLES)
|
||||||
|
SUBDIRS(codec)
|
||||||
|
ENDIF(BUILD_EXAMPLES)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# For openjpeg team if they ever want Dart+CMake
|
||||||
|
IF(OPJ_STANDALONE)
|
||||||
|
INCLUDE(Dart)
|
||||||
|
MARK_AS_ADVANCED(BUILD_TESTING DART_ROOT TCL_TCLSH)
|
||||||
|
IF(BUILD_TESTING)
|
||||||
|
ENABLE_TESTING()
|
||||||
|
ENDIF(BUILD_TESTING)
|
||||||
|
ENDIF(OPJ_STANDALONE)
|
||||||
|
# TODO, technically we should add tests, e.g:
|
||||||
|
# http://www.crc.ricoh.com/~gormish/jpeg2000conformance/
|
||||||
|
|
@ -6,6 +6,7 @@ What's New for OpenJPEG
|
|||||||
+ : added
|
+ : added
|
||||||
|
|
||||||
January 25, 2006
|
January 25, 2006
|
||||||
|
+ [Antonin Descampe] added cmake files to the project
|
||||||
! [Antonin Descampe] fix.c : replaced "WIN32" by "_MSC_VER" for int64
|
! [Antonin Descampe] fix.c : replaced "WIN32" by "_MSC_VER" for int64
|
||||||
+ [Antonin Descampe] added "OPJ_EXPORT" in openjpeg.h to generate shared lib with win32
|
+ [Antonin Descampe] added "OPJ_EXPORT" in openjpeg.h to generate shared lib with win32
|
||||||
! [Antonin Descampe] removed all CtrlM from files
|
! [Antonin Descampe] removed all CtrlM from files
|
||||||
|
11
DartConfig.cmake
Normal file
11
DartConfig.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Dashboard is opened for submissions for a 24 hour period starting at
|
||||||
|
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
|
||||||
|
SET (NIGHTLY_START_TIME "21:00:00 EDT")
|
||||||
|
|
||||||
|
# Dart server to submit results (used by client)
|
||||||
|
SET (DROP_METHOD "http")
|
||||||
|
SET (DROP_SITE "public.kitware.com")
|
||||||
|
SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
|
||||||
|
SET (TRIGGER_SITE
|
||||||
|
"http://${DROP_SITE}/cgi-bin/Submit-Public-TestingResults.cgi")
|
||||||
|
|
42
codec/CMakeLists.txt
Normal file
42
codec/CMakeLists.txt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Build the demo app, small examples
|
||||||
|
|
||||||
|
# First thing define the common source:
|
||||||
|
SET(common_SRCS
|
||||||
|
convert.c
|
||||||
|
)
|
||||||
|
# Then check if getopt is present:
|
||||||
|
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
|
||||||
|
SET(DONT_HAVE_GETOPT 1)
|
||||||
|
IF(UNIX) #I am pretty sure only *nix sys have this anyway
|
||||||
|
CHECK_INCLUDE_FILE("getopt.h" CMAKE_HAVE_GETOPT_H)
|
||||||
|
# Seems like we need the contrary:
|
||||||
|
IF(CMAKE_HAVE_GETOPT_H)
|
||||||
|
SET(DONT_HAVE_GETOPT 0)
|
||||||
|
ENDIF(CMAKE_HAVE_GETOPT_H)
|
||||||
|
ENDIF(UNIX)
|
||||||
|
|
||||||
|
# If not getopt was found then add it to the lib:
|
||||||
|
IF(DONT_HAVE_GETOPT)
|
||||||
|
ADD_DEFINITIONS(-DDONT_HAVE_GETOPT)
|
||||||
|
SET(common_SRCS
|
||||||
|
${common_SRCS}
|
||||||
|
compat/getopt.c
|
||||||
|
)
|
||||||
|
ENDIF(DONT_HAVE_GETOPT)
|
||||||
|
|
||||||
|
|
||||||
|
# Headers file are located here:
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
||||||
|
)
|
||||||
|
|
||||||
|
# Loop over all executables:
|
||||||
|
FOREACH(exe j2k_to_image image_to_j2k)
|
||||||
|
ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
|
||||||
|
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
|
||||||
|
IF(UNIX)
|
||||||
|
TARGET_LINK_LIBRARIES(${exe} -lm)
|
||||||
|
ENDIF(UNIX)
|
||||||
|
ENDFOREACH(exe)
|
||||||
|
|
||||||
|
|
35
libopenjpeg/CMakeLists.txt
Normal file
35
libopenjpeg/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
INCLUDE_REGULAR_EXPRESSION("^.*$")
|
||||||
|
# Create the lib
|
||||||
|
SET(openjpeg_SRCS
|
||||||
|
bio.c
|
||||||
|
cio.c
|
||||||
|
dwt.c
|
||||||
|
event.c
|
||||||
|
fix.c
|
||||||
|
image.c
|
||||||
|
int.c
|
||||||
|
j2k.c
|
||||||
|
j2k_lib.c
|
||||||
|
jp2.c
|
||||||
|
jpt.c
|
||||||
|
mct.c
|
||||||
|
mqc.c
|
||||||
|
openjpeg.c
|
||||||
|
pi.c
|
||||||
|
raw.c
|
||||||
|
t1.c
|
||||||
|
t2.c
|
||||||
|
tcd.c
|
||||||
|
tgt.c
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
IF (BUILD_SHARED_LIBS)
|
||||||
|
ADD_DEFINITIONS(-DOPJ_SHARED)
|
||||||
|
ELSE (BUILD_SHARED_LIBS)
|
||||||
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
||||||
|
ENDIF (BUILD_SHARED_LIBS)
|
||||||
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
ADD_LIBRARY(${OPJ_PREFIX}openjpeg ${openjpeg_SRCS})
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user