summaryrefslogtreecommitdiff
path: root/CMake/Modules/FindLibcurl.cmake
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-10-26 19:34:59 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-10-26 19:34:59 +0000
commit0ccfbebaf87b065ecffdc15bf6e74321eb713b81 (patch)
tree4587c27ccebcb107a2e3f928b9d069a4c1e06563 /CMake/Modules/FindLibcurl.cmake
parentf87feabadb652f13d607cfccfec602cadf31d29d (diff)
downloadmana-client-0ccfbebaf87b065ecffdc15bf6e74321eb713b81.tar.gz
mana-client-0ccfbebaf87b065ecffdc15bf6e74321eb713b81.tar.bz2
mana-client-0ccfbebaf87b065ecffdc15bf6e74321eb713b81.tar.xz
mana-client-0ccfbebaf87b065ecffdc15bf6e74321eb713b81.zip
Merged CMake branch
Diffstat (limited to 'CMake/Modules/FindLibcurl.cmake')
-rw-r--r--CMake/Modules/FindLibcurl.cmake41
1 files changed, 41 insertions, 0 deletions
diff --git a/CMake/Modules/FindLibcurl.cmake b/CMake/Modules/FindLibcurl.cmake
new file mode 100644
index 00000000..fe389c49
--- /dev/null
+++ b/CMake/Modules/FindLibcurl.cmake
@@ -0,0 +1,41 @@
+# - Try to find libcurl
+# Once done this will define
+#
+# LIBCURL_FOUND - system has libcurl
+# LIBCURL_INCLUDE_DIR - the libcurl include directory
+# LIBCURL_LIBRARIES - the libraries needed to use libcurl
+# LIBCURL_DEFINITIONS - Compiler switches required for using libcurl
+
+IF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(Libcurl_FIND_QUIETLY TRUE)
+ENDIF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+
+FIND_PATH(Libcurl_INCLUDE_DIR curl/curl.h
+ /usr/include
+ /usr/local/include
+ )
+
+FIND_LIBRARY(Libcurl_LIBRARY
+ NAMES curl
+ PATHS /usr/lib /usr/local/lib
+ )
+
+IF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(LIBCURL_FOUND TRUE)
+ SET(LIBCURL_INCLUDE_DIR ${Libcurl_INCLUDE_DIR})
+ SET(LIBCURL_LIBRARIES ${Libcurl_LIBRARY})
+ELSE (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+ SET(LIBCURL_FOUND TRUE)
+ENDIF (Libcurl_INCLUDE_DIR AND Libcurl_LIBRARY)
+
+IF (LIBCURL_FOUND)
+ IF (NOT Libcurl_FIND_QUIETLY)
+ MESSAGE(STATUS "Found libcurl: ${Libcurl_LIBRARY}")
+ ENDIF (NOT Libcurl_FIND_QUIETLY)
+ELSE (LIBCURL_FOUND)
+ IF (Libcurl_FIND_REQUIRED)
+ MESSAGE(SEND_ERROR "Could NOT find libcurl")
+ ENDIF (Libcurl_FIND_REQUIRED)
+ENDIF (LIBCURL_FOUND)
+
+MARK_AS_ADVANCED(Libcurl_INCLUDE_DIR Libcurl_LIBRARY)