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)
|
|
|
|
|
2011-01-02 19:10:09 +01:00
|
|
|
SET(common_SRCS "")
|
2010-09-01 02:52:26 +02:00
|
|
|
# If not getopt was found then add it to the lib:
|
|
|
|
IF(DONT_HAVE_GETOPT)
|
2011-01-02 19:10:09 +01:00
|
|
|
SET(common_SRCS ${OPENJPEG_SOURCE_DIR}/common/getopt.c)
|
2010-09-01 02:52:26 +02:00
|
|
|
ENDIF(DONT_HAVE_GETOPT)
|
|
|
|
|
2010-12-05 16:19:57 +01:00
|
|
|
# Build the library
|
2010-11-28 18:07:04 +01:00
|
|
|
IF(WIN32)
|
2010-12-05 16:19:57 +01:00
|
|
|
IF(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_EXPORTS)
|
|
|
|
ELSE(BUILD_SHARED_LIBS)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
|
|
|
ENDIF(BUILD_SHARED_LIBS)
|
2010-11-28 18:07:04 +01:00
|
|
|
ENDIF(WIN32)
|
2010-12-05 16:19:57 +01:00
|
|
|
ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME}_JPWL ${JPWL_SRCS} ${OPJ_SRCS})
|
2011-03-20 23:45:24 +01:00
|
|
|
SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME}_JPWL
|
|
|
|
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
|
2010-12-08 12:06:41 +01:00
|
|
|
|
2010-11-28 18:07:04 +01:00
|
|
|
# Install library
|
2010-12-05 16:19:57 +01:00
|
|
|
INSTALL(TARGETS ${OPENJPEG_LIBRARY_NAME}_JPWL
|
2010-10-28 16:34:37 +02:00
|
|
|
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
|
|
|
)
|
2007-09-06 12:23:40 +02:00
|
|
|
|
2010-12-08 12:06:41 +01:00
|
|
|
# Build executables
|
|
|
|
|
2007-09-06 12:23:40 +02:00
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
2010-12-08 12:06:41 +01:00
|
|
|
${OPENJPEG_SOURCE_DIR}/common
|
2011-03-20 23:45:24 +01:00
|
|
|
${ZLIB_INCLUDE_DIRNAME}
|
|
|
|
${LCMS_INCLUDE_DIRNAME}
|
|
|
|
${PNG_INCLUDE_DIRNAME}
|
|
|
|
${TIFF_INCLUDE_DIRNAME}
|
2007-09-06 12:23:40 +02:00
|
|
|
)
|
2010-12-08 12:06:41 +01:00
|
|
|
|
2007-09-06 12:23:40 +02:00
|
|
|
ADD_EXECUTABLE(JPWL_j2k_to_image
|
2010-12-08 12:06:41 +01:00
|
|
|
../codec/j2k_to_image.c
|
2010-09-05 22:54:55 +02:00
|
|
|
../codec/convert.c
|
|
|
|
../codec/index.c
|
2011-01-02 19:10:09 +01:00
|
|
|
${OPENJPEG_SOURCE_DIR}/common/color.c
|
|
|
|
${common_SRCS}
|
2007-09-06 12:23:40 +02:00
|
|
|
)
|
2011-01-02 19:10:09 +01:00
|
|
|
|
2011-03-20 23:45:24 +01:00
|
|
|
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image ${OPENJPEG_LIBRARY_NAME}_JPWL
|
|
|
|
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
|
|
|
#
|
2007-09-06 12:23:40 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2010-10-05 12:33:15 +02:00
|
|
|
|
2007-09-06 12:23:40 +02:00
|
|
|
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
|
2011-01-02 19:10:09 +01:00
|
|
|
${common_SRCS}
|
2010-09-01 02:52:26 +02:00
|
|
|
)
|
2011-01-02 19:10:09 +01:00
|
|
|
|
2011-03-20 23:45:24 +01:00
|
|
|
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k ${OPENJPEG_LIBRARY_NAME}_JPWL
|
|
|
|
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
|
|
|
#
|
2007-09-06 12:23:40 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2010-10-28 16:34:37 +02:00
|
|
|
INSTALL(TARGETS JPWL_image_to_j2k JPWL_j2k_to_image
|
|
|
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Binaries
|
|
|
|
)
|