2011-08-12 16:59:28 +02:00
|
|
|
INCLUDE_REGULAR_EXPRESSION("^.*$")
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(
|
2011-11-02 01:49:20 +01:00
|
|
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
2012-01-25 10:42:00 +01:00
|
|
|
${FCGI_INCLUDE_DIRS}
|
2011-11-19 08:16:14 +01:00
|
|
|
${CURL_INCLUDE_DIRS}
|
2011-08-12 16:59:28 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Defines the source code for the library
|
|
|
|
SET(OPENJPIP_SRCS
|
2011-12-21 10:53:08 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/boxheader_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/codestream_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/imgreg_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/marker_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/msgqueue_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/box_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/faixbox_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/index_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/placeholder_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/byte_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ihdrbox_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/manfbox_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/mhixbox_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/target_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cachemodel_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/j2kheader_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/jp2k_encoder.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/openjpip.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/query_parser.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/channel_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/session_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/jpip_parser.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/sock_manager.c
|
2012-01-26 16:02:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(SERVER_SRCS
|
2011-12-21 10:53:08 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/auxtrans_manager.c
|
|
|
|
)
|
2011-11-02 01:49:20 +01:00
|
|
|
|
|
|
|
SET(LOCAL_SRCS
|
2011-12-21 10:53:08 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/jp2k_decoder.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/imgsock_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/jpipstream_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cache_manager.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dec_clientmsg_handler.c
|
|
|
|
)
|
2011-08-12 16:59:28 +02:00
|
|
|
|
|
|
|
# Build the library
|
2011-11-02 01:49:20 +01:00
|
|
|
ADD_LIBRARY(openjpip_local STATIC ${OPENJPIP_SRCS} ${LOCAL_SRCS})
|
2012-01-25 17:30:03 +01:00
|
|
|
TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME})
|
2012-01-28 16:32:28 +01:00
|
|
|
IF(WIN32)
|
|
|
|
# add Winsock on windows+mingw
|
|
|
|
TARGET_LINK_LIBRARIES(openjpip_local ws2_32)
|
|
|
|
ENDIF(WIN32)
|
2011-08-12 16:59:28 +02:00
|
|
|
|
|
|
|
# Install library
|
2011-12-21 10:53:08 +01:00
|
|
|
INSTALL(TARGETS openjpip_local
|
|
|
|
EXPORT OpenJPEGTargets
|
|
|
|
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
|
|
|
)
|
2011-08-12 16:59:28 +02:00
|
|
|
|
2012-01-25 10:42:00 +01:00
|
|
|
IF(BUILD_JPIP_SERVER)
|
2012-01-26 16:02:58 +01:00
|
|
|
ADD_LIBRARY(openjpip_server STATIC ${OPENJPIP_SRCS} ${SERVER_SRCS})
|
2014-03-25 17:42:49 +01:00
|
|
|
TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBRARIES} ${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
2012-01-25 10:42:00 +01:00
|
|
|
SET_TARGET_PROPERTIES(openjpip_server
|
|
|
|
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
|
|
|
INSTALL(TARGETS openjpip_server
|
|
|
|
EXPORT OpenJPEGTargets
|
|
|
|
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
|
|
|
)
|
|
|
|
ENDIF(BUILD_JPIP_SERVER)
|