[trunk] FolderReorgProposal task: fix JPWL
Update issue 177
This commit is contained in:
parent
3bf4d635f2
commit
95f06f0591
|
@ -5,7 +5,7 @@ add_subdirectory(jp2)
|
||||||
|
|
||||||
# optionals components:
|
# optionals components:
|
||||||
if(BUILD_JPWL)
|
if(BUILD_JPWL)
|
||||||
# add_subdirectory(jpwl)
|
add_subdirectory(jpwl)
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_MJ2)
|
if(BUILD_MJ2)
|
||||||
add_subdirectory(mj2)
|
add_subdirectory(mj2)
|
||||||
|
|
|
@ -11,8 +11,8 @@ set(common_SRCS
|
||||||
# Headers file are located here:
|
# Headers file are located here:
|
||||||
include_directories(
|
include_directories(
|
||||||
${OPENJPEG_SOURCE_DIR}/src/lib/openjp2
|
${OPENJPEG_SOURCE_DIR}/src/lib/openjp2
|
||||||
${LCMS_INCLUDE_DIRNAME}
|
|
||||||
${OPENJPEG_SOURCE_DIR}/src/bin/common
|
${OPENJPEG_SOURCE_DIR}/src/bin/common
|
||||||
|
${LCMS_INCLUDE_DIRNAME}
|
||||||
${Z_INCLUDE_DIRNAME}
|
${Z_INCLUDE_DIRNAME}
|
||||||
${PNG_INCLUDE_DIRNAME}
|
${PNG_INCLUDE_DIRNAME}
|
||||||
${TIFF_INCLUDE_DIRNAME}
|
${TIFF_INCLUDE_DIRNAME}
|
||||||
|
@ -57,57 +57,3 @@ install(
|
||||||
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
|
${OPENJPEG_SOURCE_DIR}/doc/man/man1/opj_dump.1
|
||||||
DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
|
DESTINATION ${OPENJPEG_INSTALL_MAN_DIR}/man1)
|
||||||
#
|
#
|
||||||
|
|
||||||
if(BUILD_JPWL)
|
|
||||||
add_executable(JPWL_j2k_to_image
|
|
||||||
j2k_to_image.c
|
|
||||||
${common_SRCS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_property(
|
|
||||||
TARGET JPWL_j2k_to_image
|
|
||||||
APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(JPWL_j2k_to_image ${OPENJPEG_LIBRARY_NAME}_JPWL
|
|
||||||
${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
|
||||||
|
|
||||||
# To support universal exe:
|
|
||||||
if(ZLIB_FOUND AND APPLE)
|
|
||||||
target_link_libraries(JPWL_j2k_to_image z)
|
|
||||||
ELSe(ZLIB_FOUND AND APPLE)
|
|
||||||
target_link_libraries(JPWL_j2k_to_image ${Z_LIBNAME})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(JPWL_j2k_to_image m)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(JPWL_image_to_j2k
|
|
||||||
image_to_j2k.c
|
|
||||||
${common_SRCS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_property(
|
|
||||||
TARGET JPWL_image_to_j2k
|
|
||||||
APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(JPWL_image_to_j2k ${OPENJPEG_LIBRARY_NAME}_JPWL
|
|
||||||
${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
|
||||||
|
|
||||||
# To support universal exe:
|
|
||||||
if(ZLIB_FOUND AND APPLE)
|
|
||||||
target_link_libraries(JPWL_image_to_j2k z)
|
|
||||||
ELSe(ZLIB_FOUND AND APPLE)
|
|
||||||
target_link_libraries(JPWL_image_to_j2k ${Z_LIBNAME})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(JPWL_image_to_j2k m)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(TARGETS JPWL_image_to_j2k JPWL_j2k_to_image
|
|
||||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -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()
|
|
@ -50,12 +50,12 @@ if(WIN32)
|
||||||
add_definitions(-DOPJ_STATIC)
|
add_definitions(-DOPJ_STATIC)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
add_library(${OPENJPEG_LIBRARY_NAME}_JPWL ${JPWL_SRCS} ${OPENJPEG_SRCS})
|
add_library(openjpwl ${JPWL_SRCS} ${OPENJPEG_SRCS})
|
||||||
set_target_properties(${OPENJPEG_LIBRARY_NAME}_JPWL
|
set_target_properties(openjpwl
|
||||||
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
|
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
|
||||||
|
|
||||||
# Install library
|
# Install library
|
||||||
install(TARGETS ${OPENJPEG_LIBRARY_NAME}_JPWL
|
install(TARGETS openjpwl
|
||||||
EXPORT OpenJPEGTargets
|
EXPORT OpenJPEGTargets
|
||||||
RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||||
LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||||
|
|
Loading…
Reference in New Issue