! : changed
+ : added
+November 19, 2011
+* [vincent] fix compilation of libopenjpip (libcurl dependency) with CMake. Credit to Winfried.
+
November 16, 2011
-* [vincent] fix compilation of libopenjpip (libcurl dependency) and fix 'distcheck' rule
+* [vincent] fix compilation of libopenjpip (libcurl dependency) with the autotools and fix 'distcheck' rule
October 21, 2011
* [mickael] remove one obvious memory leak from test functions
OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF)
OPTION(BUILD_JPIP "Build the JPIP library and executables." OFF)
+IF(BUILD_JPIP)
+ FIND_PACKAGE(CURL)
+ENDIF (BUILD_JPIP)
+
+IF(NOT CURL_FOUND)
+ IF(BUILD_JPIP)
+ message(WARNING "You must have libcurl installed to use JPIP")
+ ENDIF (BUILD_JPIP)
+ SET(BUILD_JPIP OFF)
+ENDIF (NOT CURL_FOUND)
+
IF(BUILD_CODEC OR BUILD_MJ2 OR BUILD_JPIP)
OPTION(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF)
ADD_SUBDIRECTORY(thirdparty)
INCLUDE_DIRECTORIES(
${OPENJPEG_SOURCE_DIR}/libopenjpeg
${FCGI_INCLUDE_DIRNAME}
+ ${CURL_INCLUDE_DIRS}
)
# Defines the source code for the library
# Build the library
ADD_LIBRARY(openjpip_local STATIC ${OPENJPIP_SRCS} ${LOCAL_SRCS})
-TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME})
+TARGET_LINK_LIBRARIES(openjpip_local ${OPENJPEG_LIBRARY_NAME} ${CURL_LIBRARIES})
ADD_LIBRARY(openjpip_server STATIC ${OPENJPIP_SRCS})
-TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBNAME})
+TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBNAME} ${CURL_LIBRARIES})
SET_TARGET_PROPERTIES(openjpip_server
PROPERTIES COMPILE_FLAGS "-DSERVER")