3 # First thing define the common source:
7 ${OPENJPEG_SOURCE_DIR}/src/bin/common/color.c
8 ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c
11 # Headers file are located here:
13 ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h
14 ${OPENJPEG_SOURCE_DIR}/src/lib/openmj2
15 ${OPENJPEG_SOURCE_DIR}/src/bin/common
16 ${LCMS_INCLUDE_DIRNAME}
18 ${PNG_INCLUDE_DIRNAME}
19 ${TIFF_INCLUDE_DIRNAME}
24 add_definitions(-DOPJ_EXPORTS)
26 add_definitions(-DOPJ_STATIC)
30 add_definitions(-DUSE_LEGACY)
31 foreach(exe decompress compress)
32 set(jpwl_exe opj_jpwl_${exe})
33 set(jp2_exe opj_${exe})
34 add_executable(${jpwl_exe}
41 APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL
44 target_link_libraries(${jpwl_exe} openjpwl
45 ${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
47 # To support universal exe:
48 if(ZLIB_FOUND AND APPLE)
49 target_link_libraries(${jpwl_exe} z)
50 else(ZLIB_FOUND AND APPLE)
51 target_link_libraries(${jpwl_exe} ${Z_LIBNAME})
55 target_link_libraries(${jpwl_exe} m)
58 install(TARGETS ${jpwl_exe}
59 DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications