From 8944531f7502126d95e1eac655f9d68ba4438e6d Mon Sep 17 00:00:00 2001 From: Kfir Itzhak Date: Mon, 4 Nov 2013 16:57:22 +0200 Subject: [PATCH] Added cURL checks to cmake --- CMakeLists.txt | 17 +++++++++++++++-- zoneminder-config.cmake | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dd8dc096..87010afd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,14 +99,27 @@ find_package(ZLIB) if(ZLIB_FOUND) set(HAVE_LIBZLIB 1) list(APPEND ZM_BIN_LIBS ${ZLIB_LIBRARIES}) - include_directories(${ZLIB_INCLUDE_DIR}) - set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR}) + include_directories(${ZLIB_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) check_include_file("zlib.h" HAVE_ZLIB_H) set(optlibsfound "${optlibsfound} zlib") else(ZLIB_FOUND) set(optlibsnotfound "${optlibsnotfound} zlib") 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 find_package(JPEG) if(JPEG_FOUND) diff --git a/zoneminder-config.cmake b/zoneminder-config.cmake index a38f73d84..d1f89131a 100644 --- a/zoneminder-config.cmake +++ b/zoneminder-config.cmake @@ -22,6 +22,8 @@ /* Library checks and their header files */ #cmakedefine HAVE_LIBZLIB 1 #cmakedefine HAVE_ZLIB_H 1 +#cmakedefine HAVE_LIBCURL 1 +#cmakedefine HAVE_CURL_CURL_H 1 #cmakedefine HAVE_LIBJPEG 1 #cmakedefine HAVE_JPEGLIB_H 1 #cmakedefine HAVE_LIBOPENSSL 1