2010-11-17 11:26:05 +01:00
|
|
|
#JavaOpenJPEG/CMakeLists.txt
|
2007-12-10 14:16:01 +01:00
|
|
|
|
|
|
|
# First thing define the common source:
|
|
|
|
SET(common_SRCS
|
2010-11-17 11:26:05 +01:00
|
|
|
../codec/convert.c
|
|
|
|
../codec/index.c
|
2011-09-01 14:08:10 +02:00
|
|
|
../common/opj_getopt.c
|
2007-12-10 14:16:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Headers file are located here:
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
2010-11-17 11:26:05 +01:00
|
|
|
${LCMS_INCLUDE_DIR}
|
|
|
|
${PNG_INCLUDE_DIR}
|
|
|
|
${ZLIB_INCLUDE_DIR}
|
|
|
|
${TIFF_INCLUDE_DIR}
|
2007-12-10 14:16:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# Loop over all executables:
|
|
|
|
FOREACH(exe j2k_to_image image_to_j2k)
|
|
|
|
ADD_EXECUTABLE(${exe} ${exe}.c ${common_SRCS})
|
2010-11-17 11:26:05 +01:00
|
|
|
TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg ${TIFF_LIBRARIES}
|
|
|
|
${PNG_LIBRARIES} ${ZLIB_LIBRARY} ${LCMS_LIB})
|
2007-12-10 14:16:01 +01:00
|
|
|
# On unix you need to link to the math library:
|
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(${exe} -lm)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
# Install exe
|
|
|
|
INSTALL_TARGETS(/bin/ ${exe})
|
|
|
|
ENDFOREACH(exe)
|
|
|
|
|
|
|
|
|