Added cURL checks to cmake
This commit is contained in:
parent
8e96df7643
commit
8944531f75
|
@ -99,14 +99,27 @@ find_package(ZLIB)
|
||||||
if(ZLIB_FOUND)
|
if(ZLIB_FOUND)
|
||||||
set(HAVE_LIBZLIB 1)
|
set(HAVE_LIBZLIB 1)
|
||||||
list(APPEND ZM_BIN_LIBS ${ZLIB_LIBRARIES})
|
list(APPEND ZM_BIN_LIBS ${ZLIB_LIBRARIES})
|
||||||
include_directories(${ZLIB_INCLUDE_DIR})
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
|
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
|
||||||
check_include_file("zlib.h" HAVE_ZLIB_H)
|
check_include_file("zlib.h" HAVE_ZLIB_H)
|
||||||
set(optlibsfound "${optlibsfound} zlib")
|
set(optlibsfound "${optlibsfound} zlib")
|
||||||
else(ZLIB_FOUND)
|
else(ZLIB_FOUND)
|
||||||
set(optlibsnotfound "${optlibsnotfound} zlib")
|
set(optlibsnotfound "${optlibsnotfound} zlib")
|
||||||
endif(ZLIB_FOUND)
|
endif(ZLIB_FOUND)
|
||||||
|
|
||||||
|
# cURL
|
||||||
|
find_package(CURL)
|
||||||
|
if(CURL_FOUND)
|
||||||
|
set(HAVE_LIBCURL 1)
|
||||||
|
list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
|
||||||
|
include_directories(${CURL_INCLUDE_DIRS})
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||||
|
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
|
||||||
|
set(optlibsfound "${optlibsfound} cURL")
|
||||||
|
else(CURL_FOUND)
|
||||||
|
set(optlibsnotfound "${optlibsnotfound} cURL")
|
||||||
|
endif(CURL_FOUND)
|
||||||
|
|
||||||
# jpeg
|
# jpeg
|
||||||
find_package(JPEG)
|
find_package(JPEG)
|
||||||
if(JPEG_FOUND)
|
if(JPEG_FOUND)
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
/* Library checks and their header files */
|
/* Library checks and their header files */
|
||||||
#cmakedefine HAVE_LIBZLIB 1
|
#cmakedefine HAVE_LIBZLIB 1
|
||||||
#cmakedefine HAVE_ZLIB_H 1
|
#cmakedefine HAVE_ZLIB_H 1
|
||||||
|
#cmakedefine HAVE_LIBCURL 1
|
||||||
|
#cmakedefine HAVE_CURL_CURL_H 1
|
||||||
#cmakedefine HAVE_LIBJPEG 1
|
#cmakedefine HAVE_LIBJPEG 1
|
||||||
#cmakedefine HAVE_JPEGLIB_H 1
|
#cmakedefine HAVE_JPEGLIB_H 1
|
||||||
#cmakedefine HAVE_LIBOPENSSL 1
|
#cmakedefine HAVE_LIBOPENSSL 1
|
||||||
|
|
Loading…
Reference in New Issue