Cleanup jpip cmake compilation
This commit is contained in:
parent
6e624946d2
commit
c27322ff04
|
@ -1,3 +1,3 @@
|
|||
|
||||
# lib and utils
|
||||
ADD_SUBDIRECTORY(libopenjpip)
|
||||
ADD_SUBDIRECTORY(util)
|
||||
|
|
|
@ -47,16 +47,18 @@ TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME})
|
|||
ADD_LIBRARY(openjpip_server STATIC ${OPENJPIP_SRCS})
|
||||
TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBNAME})
|
||||
SET_TARGET_PROPERTIES(openjpip_server
|
||||
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
||||
|
||||
PROPERTIES COMPILE_FLAGS "-DSERVER"
|
||||
)
|
||||
|
||||
# As far as I understand the design openjpip_ libs do not have stable API
|
||||
# This is why they are build as static. Thus they should NOT be installed as of yet
|
||||
# Install library
|
||||
INSTALL(TARGETS openjpip_local
|
||||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
)
|
||||
|
||||
INSTALL(TARGETS openjpip_server
|
||||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
)
|
||||
#INSTALL(TARGETS openjpip_local
|
||||
# EXPORT OpenJPEGTargets
|
||||
# DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
# )
|
||||
#
|
||||
#INSTALL(TARGETS openjpip_server
|
||||
# EXPORT OpenJPEGTargets
|
||||
# DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries
|
||||
# )
|
||||
|
|
|
@ -5,14 +5,15 @@ INCLUDE_DIRECTORIES(
|
|||
)
|
||||
|
||||
SET(OPJ_SERVER_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/opj_server.c
|
||||
)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/opj_server.c
|
||||
)
|
||||
|
||||
# Build executable
|
||||
ADD_DEFINITIONS(-DSERVER -DQUIT_SIGNAL="quitJPIP")
|
||||
#
|
||||
ADD_EXECUTABLE(opj_server ${OPJ_SERVER_SRCS})
|
||||
TARGET_LINK_LIBRARIES(opj_server openjpip_server ${FCGI_LIBNAME})
|
||||
SET_TARGET_PROPERTIES(opj_server
|
||||
PROPERTIES COMPILE_FLAGS "-DSERVER -DQUIT_SIGNAL=\\\"quitJPIP\\\""
|
||||
)
|
||||
|
||||
# On unix you need to link to the math library:
|
||||
IF(UNIX)
|
||||
|
@ -20,19 +21,22 @@ IF(UNIX)
|
|||
ENDIF(UNIX)
|
||||
|
||||
# Install exe
|
||||
INSTALL(TARGETS opj_server
|
||||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
)
|
||||
#
|
||||
REMOVE_DEFINITIONS(-DSERVER -DQUIT_SIGNAL="quitJPIP")
|
||||
#
|
||||
FOREACH(exe opj_dec_server jpip_to_jp2 jpip_to_j2k test_index)
|
||||
#
|
||||
ADD_EXECUTABLE(${exe} ${exe}.c)
|
||||
TARGET_LINK_LIBRARIES(${exe} openjpip_local)
|
||||
INSTALL(TARGETS ${exe}
|
||||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
INSTALL(TARGETS opj_server
|
||||
EXPORT OpenJPEGTargets
|
||||
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
|
||||
)
|
||||
#
|
||||
SET(EXES
|
||||
opj_dec_server
|
||||
jpip_to_jp2
|
||||
jpip_to_j2k
|
||||
test_index
|
||||
)
|
||||
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
|
||||
)
|
||||
ENDFOREACH(exe)
|
||||
|
|
Loading…
Reference in New Issue