2011-11-02 01:49:20 +01:00
|
|
|
# Headers file are located here:
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${OPENJPEG_SOURCE_DIR}/applications/jpip/libopenjpip
|
2012-01-25 10:42:00 +01:00
|
|
|
${FCGI_INCLUDE_DIRS}
|
2011-11-02 01:49:20 +01:00
|
|
|
)
|
|
|
|
|
2012-01-25 17:30:03 +01:00
|
|
|
IF(BUILD_JPIP_SERVER)
|
|
|
|
|
|
|
|
SET(OPJ_SERVER_SRCS
|
2011-12-12 10:42:44 +01:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/opj_server.c
|
|
|
|
)
|
2012-01-25 17:30:03 +01:00
|
|
|
|
|
|
|
# Build executable
|
|
|
|
ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS})
|
|
|
|
TARGET_LINK_LIBRARIES(opj_server openjpip_server)
|
|
|
|
SET_PROPERTY(
|
|
|
|
TARGET opj_server
|
|
|
|
APPEND PROPERTY
|
|
|
|
COMPILE_DEFINITIONS SERVER QUIT_SIGNAL="quitJPIP"
|
|
|
|
)
|
2011-11-02 01:49:20 +01:00
|
|
|
|
2012-01-25 17:30:03 +01:00
|
|
|
# On unix you need to link to the math library:
|
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(opj_server m)
|
|
|
|
ENDIF(UNIX)
|
2011-11-02 01:49:20 +01:00
|
|
|
|
2012-01-25 17:30:03 +01:00
|
|
|
# Install exe
|
|
|
|
INSTALL(TARGETS opj_server
|
|
|
|
EXPORT OpenJPEGTargets
|
|
|
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
|
|
|
)
|
|
|
|
ENDIF(BUILD_JPIP_SERVER)
|
2011-11-02 01:49:20 +01:00
|
|
|
|
2011-12-12 10:42:44 +01:00
|
|
|
SET(EXES
|
|
|
|
opj_dec_server
|
|
|
|
jpip_to_jp2
|
|
|
|
jpip_to_j2k
|
|
|
|
test_index
|
2011-11-02 01:49:20 +01:00
|
|
|
)
|
2011-12-12 10:42:44 +01:00
|
|
|
FOREACH(exe ${EXES})
|
|
|
|
ADD_EXECUTABLE(${exe} ${exe}.c)
|
|
|
|
TARGET_LINK_LIBRARIES(${exe} openjpip_local)
|
|
|
|
INSTALL(TARGETS ${exe}
|
|
|
|
EXPORT OpenJPEGTargets
|
|
|
|
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
|
|
|
)
|
2011-11-02 01:49:20 +01:00
|
|
|
ENDFOREACH(exe)
|