diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-09-28 09:26:51 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2012-09-28 09:26:51 +0000 |
| commit | 95f06f0591976f4a8534c73251fe5048bbe7f770 (patch) | |
| tree | a5a890c829feecb4143cafedac5a05cd00545a56 /src/bin/jpwl | |
| parent | 3bf4d635f2401f5749c33aa4bac0b5268e687008 (diff) | |
[trunk] FolderReorgProposal task: fix JPWL
Update issue 177
Diffstat (limited to 'src/bin/jpwl')
| -rw-r--r-- | src/bin/jpwl/CMakeLists.txt | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/bin/jpwl/CMakeLists.txt b/src/bin/jpwl/CMakeLists.txt new file mode 100644 index 00000000..c9bc2219 --- /dev/null +++ b/src/bin/jpwl/CMakeLists.txt @@ -0,0 +1,58 @@ +# jpwl apps + +# First thing define the common source: +set(common_SRCS + ../jp2/convert.c + ../jp2/index.c + ${OPENJPEG_SOURCE_DIR}/src/bin/common/color.c + ${OPENJPEG_SOURCE_DIR}/src/bin/common/opj_getopt.c + ) + +# Headers file are located here: +include_directories( + ${OPENJPEG_SOURCE_DIR}/src/lib/openjp2 + ${OPENJPEG_SOURCE_DIR}/src/bin/common + ${LCMS_INCLUDE_DIRNAME} + ${Z_INCLUDE_DIRNAME} + ${PNG_INCLUDE_DIRNAME} + ${TIFF_INCLUDE_DIRNAME} + ) + +if(WIN32) + if(BUILD_SHARED_LIBS) + add_definitions(-DOPJ_EXPORTS) + else() + add_definitions(-DOPJ_STATIC) + endif() +endif() + +foreach(exe decompress compress) + set(jpwl_exe opj_jpwl_${exe}) + set(jp2_exe opj_${exe}) + add_executable(${jpwl_exe} + ../jp2/${jp2_exe}.c + ${common_SRCS} + ) + set_property( + TARGET ${jpwl_exe} + APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL + ) + + target_link_libraries(${jpwl_exe} openjpwl + ${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME}) + + # To support universal exe: + if(ZLIB_FOUND AND APPLE) + target_link_libraries(${jpwl_exe} z) + ELSe(ZLIB_FOUND AND APPLE) + target_link_libraries(${jpwl_exe} ${Z_LIBNAME}) + endif() + + if(UNIX) + target_link_libraries(${jpwl_exe} m) + endif() + + install(TARGETS ${jpwl_exe} + DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications + ) +endforeach() |
