[asterisk-scf-commits] asterisk-scf/release/cmake.git branch "ice-package" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jan 13 14:34:41 CST 2011


branch "ice-package" has been updated
       via  f22ec20ea1e509b8cfd5479c8d89440a8b93acbd (commit)
      from  0c9f1a7e250a7be889ea7bbc7a13cf20303d3fe0 (commit)

Summary of changes:
 modules/FindIce.cmake |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit f22ec20ea1e509b8cfd5479c8d89440a8b93acbd
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Jan 13 14:34:34 2011 -0600

    Report the version of Ice found.

diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index 854fa63..2fc9512 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -5,16 +5,14 @@
 # ICE_INCLUDE_DIR
 # ICE_SLICE_DIR
 # ICE_CXX_FLAGS
-# ICE_Ice_FOUND
-# ICE_Ice_LIBRARY
-# ICE_Ice_LIBRARY_DEBUG
-# ICE_Ice_LIBRARY_RELEASE
-#
-# todo:
 # ICE_VERSION
 # ICE_VERSION_MAJOR
 # ICE_VERSION_MINOR
 # ICE_VERSION_PATCH
+# ICE_Ice_FOUND
+# ICE_Ice_LIBRARY
+# ICE_Ice_LIBRARY_DEBUG
+# ICE_Ice_LIBRARY_RELEASE
 
 find_package(PackageHandleStandardArgs)
 
@@ -155,13 +153,15 @@ if(NOT ICE_DIR)
         "Ice version detected: ${_ice_config_version}")
     endif()
 
-    if(NOT Ice_FIND_VERSION_EXACT)
-      _ice_set_cache_path(ICE_DIR "${_ice_possible_dir}" "Location of Ice")
-      break()
-    endif()
-
-    if(${_ice_config_version} VERSION_EQUAL ${Ice_FIND_VERSION})
+    if((NOT Ice_FIND_VERSION_EXACT) OR (${_ice_config_version} VERSION_EQUAL ${Ice_FIND_VERSION}))
       _ice_set_cache_path(ICE_DIR "${_ice_possible_dir}" "Location of Ice")
+      _ice_set_cache_string(ICE_VERSION "${_ice_config_version}" "Version of Ice")
+      string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" _ice_version_major "${_ice_config_version}")
+      _ice_set_cache_string(ICE_VERSION_MAJOR "${_ice_version_major}" "Version of Ice (major)")
+      string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" _ice_version_minor "${_ice_config_version}")
+      _ice_set_cache_string(ICE_VERSION_MINOR "${_ice_version_minor}" "Version of Ice (minor)")
+      string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" _ice_version_patch "${_ice_config_version}")
+      _ice_set_cache_string(ICE_VERSION_PATCH "${_ice_version_patch}" "Version of Ice (patch)")
       break()
     endif()
 

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


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list