2007-09-06 12:23:40 +02:00
|
|
|
# Makefile for the main JPWL OpenJPEG codecs: JPWL_ j2k_to_image and JPWL_image_to_j2k
|
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
add_definitions(-DUSE_JPWL)
|
2007-09-06 12:23:40 +02:00
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
set(JPWL_SRCS crc.c jpwl.c jpwl_lib.c rs.c)
|
|
|
|
if(APPLE)
|
|
|
|
set_source_files_properties(
|
2012-03-02 15:31:46 +01:00
|
|
|
rs.c
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS -fno-common)
|
2012-08-30 19:20:03 +02:00
|
|
|
endif()
|
2007-09-06 12:23:40 +02:00
|
|
|
|
2012-08-30 19:14:39 +02:00
|
|
|
include_directories(
|
2011-04-14 00:38:50 +02:00
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
|
|
|
)
|
2010-09-01 02:52:26 +02:00
|
|
|
|
2010-12-05 16:19:57 +01:00
|
|
|
# Build the library
|
2012-08-30 19:14:39 +02:00
|
|
|
if(WIN32)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
add_definitions(-DOPJ_EXPORTS)
|
2012-08-30 19:20:03 +02:00
|
|
|
else()
|
2012-08-30 19:14:39 +02:00
|
|
|
add_definitions(-DOPJ_STATIC)
|
2012-08-30 19:20:03 +02:00
|
|
|
endif()
|
|
|
|
endif()
|
2012-08-30 19:14:39 +02:00
|
|
|
add_library(${OPENJPEG_LIBRARY_NAME}_JPWL ${JPWL_SRCS} ${OPENJPEG_SRCS})
|
2012-08-30 19:20:03 +02:00
|
|
|
set_target_properties(${OPENJPEG_LIBRARY_NAME}_JPWL
|
2011-03-20 23:45:24 +01:00
|
|
|
PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
|
2010-12-08 12:06:41 +01:00
|
|
|
|
2010-11-28 18:07:04 +01:00
|
|
|
# Install library
|
2012-08-30 19:14:39 +02:00
|
|
|
install(TARGETS ${OPENJPEG_LIBRARY_NAME}_JPWL
|
2012-03-02 15:31:46 +01:00
|
|
|
EXPORT OpenJPEGTargets
|
|
|
|
RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
|
|
|
LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
|
|
|
ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
2010-10-28 16:34:37 +02:00
|
|
|
)
|