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_BINARY_DIR}/src/bin/common # opj_apps_config.h
15 ${OPENJPEG_SOURCE_DIR}/src/lib/openmj2
16 ${OPENJPEG_SOURCE_DIR}/src/bin/common
17 ${LCMS_INCLUDE_DIRNAME}
19 ${PNG_INCLUDE_DIRNAME}
20 ${TIFF_INCLUDE_DIRNAME}
25 add_definitions(-DOPJ_EXPORTS)
27 add_definitions(-DOPJ_STATIC)
31 add_definitions(-DOPJ_USE_LEGACY)
32 foreach(exe decompress compress)
33 set(jpwl_exe opj_jpwl_${exe})
34 set(jp2_exe opj_${exe})
35 add_executable(${jpwl_exe}
42 APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL
45 target_link_libraries(${jpwl_exe} openjpwl
46 ${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
48 # To support universal exe:
49 if(ZLIB_FOUND AND APPLE)
50 target_link_libraries(${jpwl_exe} z)
51 else(ZLIB_FOUND AND APPLE)
52 target_link_libraries(${jpwl_exe} ${Z_LIBNAME})
56 target_link_libraries(${jpwl_exe} m)
59 install(TARGETS ${jpwl_exe}
60 DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications