2007-09-06 12:23:40 +02:00
|
|
|
# Makefile for the main JPWL OpenJPEG codecs: JPWL_ j2k_to_image and JPWL_image_to_j2k
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DUSE_JPWL)
|
|
|
|
|
2010-09-05 22:54:55 +02:00
|
|
|
SET(OPJ_SRCS
|
|
|
|
../libopenjpeg/bio.c
|
|
|
|
../libopenjpeg/cio.c
|
|
|
|
../libopenjpeg/dwt.c
|
|
|
|
../libopenjpeg/event.c
|
|
|
|
../libopenjpeg/image.c
|
|
|
|
../libopenjpeg/j2k.c
|
|
|
|
../libopenjpeg/j2k_lib.c
|
|
|
|
../libopenjpeg/jp2.c
|
|
|
|
../libopenjpeg/jpt.c
|
|
|
|
../libopenjpeg/mct.c
|
|
|
|
../libopenjpeg/mqc.c
|
|
|
|
../libopenjpeg/openjpeg.c
|
|
|
|
../libopenjpeg/pi.c
|
|
|
|
../libopenjpeg/raw.c
|
|
|
|
../libopenjpeg/t1.c
|
|
|
|
../libopenjpeg/t2.c
|
|
|
|
../libopenjpeg/tcd.c
|
2007-09-06 12:23:40 +02:00
|
|
|
../libopenjpeg/tgt.c
|
|
|
|
)
|
|
|
|
SET(JPWL_SRCS crc.c jpwl.c jpwl_lib.c rs.c)
|
|
|
|
|
2010-09-01 02:52:26 +02:00
|
|
|
# If not getopt was found then add it to the lib:
|
|
|
|
IF(DONT_HAVE_GETOPT)
|
|
|
|
SET(OPJ_SRCS
|
|
|
|
${OPJ_SRCS}
|
|
|
|
../codec/compat/getopt.c
|
|
|
|
)
|
|
|
|
ENDIF(DONT_HAVE_GETOPT)
|
|
|
|
|
2007-09-06 12:23:40 +02:00
|
|
|
ADD_LIBRARY(openjpeg_JPWL ${JPWL_SRCS} ${OPJ_SRCS})
|
|
|
|
|
|
|
|
# Do the proper thing when building static...if only there was configured
|
|
|
|
# headers or def files instead
|
2010-09-01 02:52:26 +02:00
|
|
|
IF(NOT BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
|
|
|
ENDIF(NOT BUILD_SHARED_LIBS)
|
2007-09-06 12:23:40 +02:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_PACKAGE(TIFF REQUIRED)
|
2010-09-01 02:52:26 +02:00
|
|
|
FIND_PACKAGE(PNG REQUIRED)
|
|
|
|
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} )
|
|
|
|
INCLUDE_DIRECTORIES( ${TIFF_INCLUDE_DIR} )
|
2007-09-06 12:23:40 +02:00
|
|
|
|
|
|
|
ADD_EXECUTABLE(JPWL_j2k_to_image
|
2010-09-05 22:54:55 +02:00
|
|
|
../codec/convert.c
|
|
|
|
../codec/index.c
|
2010-09-01 02:52:26 +02:00
|
|
|
../codec/j2k_to_image.c
|
2007-09-06 12:23:40 +02:00
|
|
|
)
|
2010-09-05 22:54:55 +02:00
|
|
|
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image ${OPJ_PREFIX}openjpeg_JPWL ${TIFF_LIBRARIES} ${PNG_LIBRARIES})
|
2007-09-06 12:23:40 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(JPWL_image_to_j2k
|
2010-09-01 02:52:26 +02:00
|
|
|
../codec/convert.c
|
|
|
|
../codec/index.c
|
|
|
|
../codec/image_to_j2k.c
|
|
|
|
)
|
2010-09-05 22:54:55 +02:00
|
|
|
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k ${OPJ_PREFIX}openjpeg_JPWL ${TIFF_LIBRARIES} ${PNG_LIBRARIES})
|
2007-09-06 12:23:40 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|