2007-09-06 12:13:05 +02:00
|
|
|
# Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2
|
|
|
|
|
2011-09-01 14:08:10 +02:00
|
|
|
SET(common_SRCS ${OPENJPEG_SOURCE_DIR}/applications/common/opj_getopt.c)
|
2011-01-02 19:10:09 +01:00
|
|
|
|
|
|
|
# While mj2 executables do not use the API correctly, we do not link with the library but rather compile the sources files.
|
|
|
|
SET(OPJ_SRCS
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/bio.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/cio.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/dwt.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/event.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/image.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/j2k.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/j2k_lib.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/jp2.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/jpt.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/mct.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/mqc.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/openjpeg.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/pi.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/raw.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/t1.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/t2.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/tcd.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/tgt.c
|
2011-09-09 16:52:42 +02:00
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/cidx_manager.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/phix_manager.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/ppix_manager.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/thix_manager.c
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg/tpix_manager.c
|
2011-01-02 19:10:09 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(MJ2_SRCS mj2.c mj2_convert.c)
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
ADD_DEFINITIONS(-DOPJ_STATIC)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2007-09-06 12:13:05 +02:00
|
|
|
# Headers file are located here:
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
2011-04-14 00:38:50 +02:00
|
|
|
${OPENJPEG_SOURCE_DIR}/applications/common
|
2011-03-20 23:45:24 +01:00
|
|
|
${LCMS_INCLUDE_DIRNAME}
|
2007-09-06 12:13:05 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(frames_to_mj2
|
|
|
|
frames_to_mj2.c
|
2011-01-02 19:10:09 +01:00
|
|
|
${common_SRCS}
|
|
|
|
${OPJ_SRCS}
|
|
|
|
${MJ2_SRCS}
|
2010-09-05 23:59:25 +02:00
|
|
|
)
|
2011-07-29 12:47:42 +02:00
|
|
|
TARGET_LINK_LIBRARIES(frames_to_mj2 ${LCMS_LIBNAME})
|
|
|
|
|
2007-09-06 12:13:05 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(frames_to_mj2 m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(mj2_to_frames
|
|
|
|
mj2_to_frames.c
|
2011-01-02 19:10:09 +01:00
|
|
|
${common_SRCS}
|
|
|
|
${OPJ_SRCS}
|
|
|
|
${MJ2_SRCS}
|
2011-04-14 00:38:50 +02:00
|
|
|
${OPENJPEG_SOURCE_DIR}/applications/common/color.c
|
2010-09-05 23:59:25 +02:00
|
|
|
)
|
2011-07-29 12:47:42 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mj2_to_frames ${LCMS_LIBNAME})
|
|
|
|
|
2007-09-06 12:13:05 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(mj2_to_frames m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(extract_j2k_from_mj2
|
|
|
|
extract_j2k_from_mj2.c
|
2011-01-02 19:10:09 +01:00
|
|
|
${OPJ_SRCS}
|
|
|
|
${MJ2_SRCS}
|
|
|
|
)
|
2011-07-29 12:47:42 +02:00
|
|
|
TARGET_LINK_LIBRARIES(extract_j2k_from_mj2 ${LCMS_LIBNAME})
|
|
|
|
|
2007-09-06 12:13:05 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(extract_j2k_from_mj2 m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(wrap_j2k_in_mj2
|
|
|
|
wrap_j2k_in_mj2.c
|
2011-01-02 19:10:09 +01:00
|
|
|
${OPJ_SRCS}
|
|
|
|
${MJ2_SRCS}
|
|
|
|
)
|
2011-07-29 12:47:42 +02:00
|
|
|
TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 ${LCMS_LIBNAME})
|
|
|
|
|
2007-09-06 12:13:05 +02:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(wrap_j2k_in_mj2 m)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
2007-09-12 11:04:03 +02:00
|
|
|
INSTALL(TARGETS frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
|
2011-04-14 00:38:50 +02:00
|
|
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR})
|