This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  a6810c3c5cb8e0a83bac551c36b5312909f48a8b (commit)
       via  c1b884965f86e2622f55d261259fc2a148035f5b (commit)
      from  fac20b8adb0a9aa338e670957f62eadf756ecc69 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6810c3c5cb8e0a83bac551c36b5312909f48a8b
commit a6810c3c5cb8e0a83bac551c36b5312909f48a8b
Merge: fac20b8 c1b8849
Author:     Rolf Eike Beer <e...@sf-mail.de>
AuthorDate: Mon Jan 23 15:47:33 2012 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Jan 23 15:47:33 2012 -0500

    Merge topic 'improve-findcurl' into next
    
    c1b8849 FindCURL: support version selection


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1b884965f86e2622f55d261259fc2a148035f5b
commit c1b884965f86e2622f55d261259fc2a148035f5b
Author:     Rolf Eike Beer <e...@sf-mail.de>
AuthorDate: Mon Jan 23 21:46:56 2012 +0100
Commit:     Rolf Eike Beer <e...@sf-mail.de>
CommitDate: Mon Jan 23 21:46:56 2012 +0100

    FindCURL: support version selection

diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 36f3841..517638a 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -1,12 +1,14 @@
 # - Find curl
 # Find the native CURL headers and libraries.
 #
-#  CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
-#  CURL_LIBRARIES    - List of libraries when using curl.
-#  CURL_FOUND        - True if curl found.
+#  CURL_INCLUDE_DIRS   - where to find curl/curl.h, etc.
+#  CURL_LIBRARIES      - List of libraries when using curl.
+#  CURL_FOUND          - True if curl found.
+#  CURL_VERSION_STRING - the version of curl found (since CMake 2.8.8)
 
 #=============================================================================
 # Copyright 2006-2009 Kitware, Inc.
+# Copyright 2012 Rolf Eike Beer <e...@sf-mail.de>
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -32,10 +34,19 @@ FIND_LIBRARY(CURL_LIBRARY NAMES
 )
 MARK_AS_ADVANCED(CURL_LIBRARY)
 
+IF(CURL_INCLUDE_DIR AND EXISTS "${CURL_INCLUDE_DIR}/curl/curlver.h")
+  FILE(STRINGS "${CURL_INCLUDE_DIR}/curl/curlver.h" curl_version_str REGEX 
"^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
+
+  STRING(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" 
"\\1" CURL_VERSION_STRING "${curl_version_str}")
+  UNSET(curl_version_str)
+ENDIF()
+
 # handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if 
 # all listed variables are TRUE
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY 
CURL_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
+                                  REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
+                                  VERSION_VAR CURL_VERSION_STRING)
 
 IF(CURL_FOUND)
   SET(CURL_LIBRARIES ${CURL_LIBRARY})

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindCURL.cmake |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to