[1.5] remove pthread dependency in JPIP client and tweak thirdparty stuff
This commit is contained in:
parent
2b746a71cb
commit
040c9a68b6
|
@ -184,6 +184,7 @@ ADD_SUBDIRECTORY(libopenjpeg)
|
|||
# Build Applications
|
||||
OPTION(BUILD_CODEC "Build the CODEC executables" ON)
|
||||
OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF)
|
||||
OPTION(BUILD_JPWL "Build the JPWL library and executables" OFF)
|
||||
OPTION(BUILD_JPIP "Build the JPIP library and executables." OFF)
|
||||
IF(BUILD_JPIP)
|
||||
OPTION(BUILD_JPIP_SERVER "Build the JPIP server." OFF)
|
||||
|
@ -193,16 +194,13 @@ OPTION(BUILD_JAVA "Build the openjpeg jar (Java)" OFF)
|
|||
MARK_AS_ADVANCED(BUILD_VIEWER)
|
||||
MARK_AS_ADVANCED(BUILD_JAVA)
|
||||
|
||||
# Try to find lib Z
|
||||
FIND_PACKAGE(ZLIB)
|
||||
|
||||
IF(BUILD_CODEC OR BUILD_MJ2 OR BUILD_JPIP)
|
||||
IF(BUILD_CODEC OR BUILD_MJ2)
|
||||
# OFF: It will only build 3rd party libs if they are not found on the system
|
||||
# ON: 3rd party libs will ALWAYS be build, and used
|
||||
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF)
|
||||
ADD_SUBDIRECTORY(thirdparty)
|
||||
ADD_SUBDIRECTORY(applications)
|
||||
ENDIF (BUILD_CODEC OR BUILD_MJ2 OR BUILD_JPIP)
|
||||
ENDIF (BUILD_CODEC OR BUILD_MJ2)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# opj_config.h generation (2/2)
|
||||
|
@ -211,10 +209,6 @@ CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_config.h.cmake.in"
|
|||
@ONLY
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build JPWL-flavoured library and executables
|
||||
OPTION(BUILD_JPWL "Build the JPWL library and executables" OFF)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build DOCUMENTATION (not in ALL target and only if Doxygen is found)
|
||||
OPTION(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
|
||||
|
|
|
@ -70,7 +70,14 @@ IF(BUILD_JPWL)
|
|||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image ${OPENJPEG_LIBRARY_NAME}_JPWL
|
||||
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
||||
${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(ZLIB_FOUND AND APPLE)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(JPWL_j2k_to_image m)
|
||||
|
@ -87,7 +94,14 @@ IF(BUILD_JPWL)
|
|||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k ${OPENJPEG_LIBRARY_NAME}_JPWL
|
||||
${LCMS_LIBNAME} ${Z_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
|
||||
${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(ZLIB_FOUND AND APPLE)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(JPWL_image_to_j2k m)
|
||||
|
|
|
@ -4,10 +4,9 @@ IF(BUILD_JPIP_SERVER)
|
|||
FIND_PACKAGE(FCGI REQUIRED)
|
||||
ENDIF(BUILD_JPIP_SERVER)
|
||||
|
||||
# JPIP client & server:
|
||||
# JPIP library:
|
||||
ADD_SUBDIRECTORY(libopenjpip)
|
||||
|
||||
# jpip server:
|
||||
IF(BUILD_JPIP_SERVER)
|
||||
# JPIP binaries:
|
||||
ADD_SUBDIRECTORY(util)
|
||||
ENDIF(BUILD_JPIP_SERVER)
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ SET(LOCAL_SRCS
|
|||
|
||||
# Build the library
|
||||
ADD_LIBRARY(openjpip_local STATIC ${OPENJPIP_SRCS} ${LOCAL_SRCS})
|
||||
TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME} ${CURL_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME})
|
||||
|
||||
# Install library
|
||||
INSTALL(TARGETS openjpip_local
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <unistd.h>
|
||||
#include "jp2k_encoder.h"
|
||||
|
||||
#ifdef SERVER
|
||||
|
||||
server_record_t * init_JPIPserver( int tcp_auxport, int udp_auxport)
|
||||
{
|
||||
server_record_t *record = (server_record_t *)malloc( sizeof(server_record_t));
|
||||
|
@ -176,6 +178,7 @@ void end_QRprocess( server_record_t *rec, QR_t **qr)
|
|||
free( *qr);
|
||||
}
|
||||
|
||||
|
||||
void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr, server_record_t *rec)
|
||||
{
|
||||
if( query)
|
||||
|
@ -191,6 +194,8 @@ void local_log( bool query, bool messages, bool sessions, bool targets, QR_t *qr
|
|||
print_alltarget( rec->targetlist);
|
||||
}
|
||||
|
||||
#endif //SERVER
|
||||
|
||||
#ifndef SERVER
|
||||
|
||||
dec_server_record_t * init_dec_server( int port)
|
||||
|
|
|
@ -66,6 +66,8 @@
|
|||
*==========================================================
|
||||
*/
|
||||
|
||||
#ifdef SERVER
|
||||
|
||||
//! Server static records
|
||||
typedef struct server_record{
|
||||
sessionlist_param_t *sessionlist; //!< list of session records
|
||||
|
@ -129,8 +131,6 @@ void send_responsedata( server_record_t *rec, QR_t *qr);
|
|||
*/
|
||||
void end_QRprocess( server_record_t *rec, QR_t **qr);
|
||||
|
||||
#ifndef SERVER
|
||||
|
||||
/**
|
||||
* Option for local tests; print out parameter values to logstream (stderr)
|
||||
*
|
||||
|
|
|
@ -4,13 +4,15 @@ INCLUDE_DIRECTORIES(
|
|||
${FCGI_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
IF(BUILD_JPIP_SERVER)
|
||||
|
||||
SET(OPJ_SERVER_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/opj_server.c
|
||||
)
|
||||
|
||||
# Build executable
|
||||
ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS})
|
||||
TARGET_LINK_LIBRARIES(opj_server openjpip_server ${FCGI_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(opj_server openjpip_server)
|
||||
SET_PROPERTY(
|
||||
TARGET opj_server
|
||||
APPEND PROPERTY
|
||||
|
@ -27,7 +29,8 @@ INSTALL(TARGETS opj_server
|
|||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
)
|
||||
#
|
||||
ENDIF(BUILD_JPIP_SERVER)
|
||||
|
||||
SET(EXES
|
||||
opj_dec_server
|
||||
jpip_to_jp2
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# 3rd party libs
|
||||
|
||||
#------------
|
||||
# Try to find lib Z
|
||||
IF(BUILD_THIRDPARTY)
|
||||
# Try to build it
|
||||
message(STATUS "We will build Z lib from thirdparty")
|
||||
|
@ -8,6 +10,8 @@ IF(BUILD_THIRDPARTY)
|
|||
SET(Z_INCLUDE_DIRNAME ${OPENJPEG_SOURCE_DIR}/thirdparty/include PARENT_SCOPE)
|
||||
SET(ZLIB_FOUND 1)
|
||||
ELSE (BUILD_THIRDPARTY)
|
||||
# Try to find lib Z
|
||||
FIND_PACKAGE(ZLIB)
|
||||
IF(ZLIB_FOUND)
|
||||
SET(Z_LIBNAME ${ZLIB_LIBRARIES} PARENT_SCOPE)
|
||||
SET(Z_INCLUDE_DIRNAME ${ZLIB_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
|
@ -19,7 +23,7 @@ ENDIF(BUILD_THIRDPARTY)
|
|||
|
||||
|
||||
#------------
|
||||
# Try to find lib PNG (which depends to zlib)
|
||||
# Try to find lib PNG (which depends on zlib)
|
||||
IF(BUILD_THIRDPARTY)
|
||||
# Try to build it
|
||||
message(STATUS "We will build PNG lib from thirdparty")
|
||||
|
|
Loading…
Reference in New Issue