[1.5] Remove use of custom PTHREAD module. Prefer cmake's one.
This commit is contained in:
parent
7b6ae8810d
commit
6c6cd79820
|
@ -1,20 +0,0 @@
|
||||||
# Look for the header file.
|
|
||||||
FIND_PATH(PTHREAD_INCLUDE_DIR NAMES pthread.h)
|
|
||||||
|
|
||||||
# Look for the library.
|
|
||||||
FIND_LIBRARY(PTHREAD_LIBRARY NAMES pthread)
|
|
||||||
|
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set PTHREAD_FOUND to TRUE if all listed variables are TRUE.
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PTHREAD DEFAULT_MSG PTHREAD_LIBRARY PTHREAD_INCLUDE_DIR)
|
|
||||||
|
|
||||||
# Copy the results to the output variables.
|
|
||||||
IF(PTHREAD_FOUND)
|
|
||||||
SET(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY})
|
|
||||||
SET(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR})
|
|
||||||
ELSE(PTHREAD_FOUND)
|
|
||||||
SET(PTHREAD_LIBRARIES)
|
|
||||||
SET(PTHREAD_INCLUDE_DIRS)
|
|
||||||
ENDIF(PTHREAD_FOUND)
|
|
||||||
|
|
||||||
MARK_AS_ADVANCED(PTHREAD_INCLUDE_DIRS PTHREAD_LIBRARIES)
|
|
|
@ -2,7 +2,10 @@
|
||||||
IF(BUILD_JPIP_SERVER)
|
IF(BUILD_JPIP_SERVER)
|
||||||
FIND_PACKAGE(CURL REQUIRED)
|
FIND_PACKAGE(CURL REQUIRED)
|
||||||
FIND_PACKAGE(FCGI REQUIRED)
|
FIND_PACKAGE(FCGI REQUIRED)
|
||||||
FIND_PACKAGE(PTHREAD REQUIRED)
|
FIND_PACKAGE(Threads REQUIRED)
|
||||||
|
IF(NOT CMAKE_USE_PTHREADS)
|
||||||
|
MESSAGE(FATAL_ERROR "Only pthread are supported")
|
||||||
|
ENDIF(NOT CMAKE_USE_PTHREADS)
|
||||||
ENDIF(BUILD_JPIP_SERVER)
|
ENDIF(BUILD_JPIP_SERVER)
|
||||||
|
|
||||||
# JPIP library:
|
# JPIP library:
|
||||||
|
|
|
@ -4,7 +4,6 @@ INCLUDE_DIRECTORIES(
|
||||||
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
${OPENJPEG_SOURCE_DIR}/libopenjpeg
|
||||||
${FCGI_INCLUDE_DIRS}
|
${FCGI_INCLUDE_DIRS}
|
||||||
${CURL_INCLUDE_DIRS}
|
${CURL_INCLUDE_DIRS}
|
||||||
${PTHREAD_INCLUDE_DIRS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Defines the source code for the library
|
# Defines the source code for the library
|
||||||
|
@ -63,7 +62,7 @@ INSTALL(TARGETS openjpip_local
|
||||||
|
|
||||||
IF(BUILD_JPIP_SERVER)
|
IF(BUILD_JPIP_SERVER)
|
||||||
ADD_LIBRARY(openjpip_server STATIC ${OPENJPIP_SRCS} ${SERVER_SRCS})
|
ADD_LIBRARY(openjpip_server STATIC ${OPENJPIP_SRCS} ${SERVER_SRCS})
|
||||||
TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBRARIES} ${CURL_LIBRARIES} ${PTHREAD_LIBRARIES})
|
TARGET_LINK_LIBRARIES(openjpip_server ${FCGI_LIBRARIES} ${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS})
|
||||||
SET_TARGET_PROPERTIES(openjpip_server
|
SET_TARGET_PROPERTIES(openjpip_server
|
||||||
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
PROPERTIES COMPILE_FLAGS "-DSERVER")
|
||||||
INSTALL(TARGETS openjpip_server
|
INSTALL(TARGETS openjpip_server
|
||||||
|
|
Loading…
Reference in New Issue