Make sure to append the compile def

This commit is contained in:
Mathieu Malaterre 2011-12-21 09:53:08 +00:00
parent 0b7e0166a7
commit 3280dc344f
2 changed files with 44 additions and 43 deletions

View File

@ -8,40 +8,40 @@ INCLUDE_DIRECTORIES(
# Defines the source code for the library # Defines the source code for the library
SET(OPENJPIP_SRCS SET(OPENJPIP_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/boxheader_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/boxheader_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/codestream_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/codestream_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/imgreg_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/imgreg_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/marker_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/marker_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/msgqueue_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/msgqueue_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/box_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/box_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/faixbox_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/faixbox_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/index_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/index_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/metadata_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/placeholder_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/placeholder_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/byte_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/byte_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/ihdrbox_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/ihdrbox_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/manfbox_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/manfbox_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/mhixbox_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/mhixbox_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/target_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/target_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/cachemodel_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/cachemodel_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/j2kheader_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/j2kheader_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/jp2k_encoder.c ${CMAKE_CURRENT_SOURCE_DIR}/jp2k_encoder.c
${CMAKE_CURRENT_SOURCE_DIR}/openjpip.c ${CMAKE_CURRENT_SOURCE_DIR}/openjpip.c
${CMAKE_CURRENT_SOURCE_DIR}/query_parser.c ${CMAKE_CURRENT_SOURCE_DIR}/query_parser.c
${CMAKE_CURRENT_SOURCE_DIR}/channel_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/channel_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/session_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/session_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/jpip_parser.c ${CMAKE_CURRENT_SOURCE_DIR}/jpip_parser.c
${CMAKE_CURRENT_SOURCE_DIR}/sock_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/sock_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/auxtrans_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/auxtrans_manager.c
) )
SET(LOCAL_SRCS SET(LOCAL_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/jp2k_decoder.c ${CMAKE_CURRENT_SOURCE_DIR}/jp2k_decoder.c
${CMAKE_CURRENT_SOURCE_DIR}/imgsock_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/imgsock_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/jpipstream_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/jpipstream_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/cache_manager.c ${CMAKE_CURRENT_SOURCE_DIR}/cache_manager.c
${CMAKE_CURRENT_SOURCE_DIR}/dec_clientmsg_handler.c ${CMAKE_CURRENT_SOURCE_DIR}/dec_clientmsg_handler.c
) )
# Build the library # Build the library
ADD_LIBRARY(openjpip_local STATIC ${OPENJPIP_SRCS} ${LOCAL_SRCS}) ADD_LIBRARY(openjpip_local STATIC ${OPENJPIP_SRCS} ${LOCAL_SRCS})
@ -52,14 +52,13 @@ TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBNAME} ${CURL_LIBRARIES})
SET_TARGET_PROPERTIES(openjpip_server SET_TARGET_PROPERTIES(openjpip_server
PROPERTIES COMPILE_FLAGS "-DSERVER") PROPERTIES COMPILE_FLAGS "-DSERVER")
# Install library # Install library
INSTALL(TARGETS openjpip_local INSTALL(TARGETS openjpip_local
EXPORT OpenJPEGTargets EXPORT OpenJPEGTargets
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
) )
INSTALL(TARGETS openjpip_server INSTALL(TARGETS openjpip_server
EXPORT OpenJPEGTargets EXPORT OpenJPEGTargets
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
) )

View File

@ -11,8 +11,10 @@ SET(OPJ_SERVER_SRCS
# Build executable # Build executable
ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS}) ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS})
TARGET_LINK_LIBRARIES(opj_server openjpip_server ${FCGI_LIBNAME}) TARGET_LINK_LIBRARIES(opj_server openjpip_server ${FCGI_LIBNAME})
SET_TARGET_PROPERTIES(opj_server SET_PROPERTY(
PROPERTIES COMPILE_FLAGS "-DSERVER -DQUIT_SIGNAL=\\\"quitJPIP\\\"" TARGET opj_server
APPEND PROPERTY
COMPILE_DEFINITIONS SERVER QUIT_SIGNAL="quitJPIP"
) )
# On unix you need to link to the math library: # On unix you need to link to the math library: