[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
Fri Jan 14 07:41:33 CST 2011


branch "ice-package" has been updated
       via  36f69e1f861d6d3ebe5fd7a873f1bf21a219db32 (commit)
      from  b7aef9ec25d43849bff234ec63d8ab1047ac9faa (commit)

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


- Log -----------------------------------------------------------------
commit 36f69e1f861d6d3ebe5fd7a873f1bf21a219db32
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jan 14 07:41:05 2011 -0600

    Various minor cleanups, but also changed to not search for Ice library
    unless it is requested.

diff --git a/modules/FindIce.cmake b/modules/FindIce.cmake
index cf73699..f4d64ef 100644
--- a/modules/FindIce.cmake
+++ b/modules/FindIce.cmake
@@ -9,15 +9,12 @@
 # ICE_VERSION_MAJOR
 # ICE_VERSION_MINOR
 # ICE_VERSION_PATCH
-# ICE_ICE_FOUND
-# ICE_ICE_LIBRARY
-# ICE_ICE_LIBRARY_DEBUG
-# ICE_ICE_LIBRARY_RELEASE
 # for each component requested, sets (with <component> uppercased):
 # ICE_<component>_FOUND
 # ICE_<component>_LIBRARY
 # ICE_<component>_LIBRARY_DEBUG
 # ICE_<component>_LIBRARY_RELEASE
+# ICE_<component>_LIBRARIES
 
 find_package(PackageHandleStandardArgs)
 find_package(PackageComponentHandleStandardArgs)
@@ -27,6 +24,11 @@ function(_ice_set_cache_path var value reason)
   mark_as_advanced(FORCE ${var})
 endfunction()
 
+function(_ice_set_cache_filepath var value reason)
+  set(${var} ${value} CACHE FILEPATH "${reason}" FORCE)
+  mark_as_advanced(FORCE ${var})
+endfunction()
+
 function(_ice_set_cache_string var value reason)
   set(${var} ${value} CACHE STRING "${reason}" FORCE)
   mark_as_advanced(FORCE ${var})
@@ -34,11 +36,16 @@ endfunction()
 
 function(_ice_find_library library)
   string(TOUPPER "${library}" upper)
+
+  if(WIN32)
+    set(_ice_debug_suffix "d")
+  endif()
+
   find_library(ICE_${upper}_LIBRARY_RELEASE NAMES "${library}" NO_DEFAULT_PATH PATHS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
   find_library(ICE_${upper}_LIBRARY_DEBUG NAMES "${library}${_ice_debug_suffix}" NO_DEFAULT_PATH PATHS "${ICE_DIR}" PATH_SUFFIXES "lib" "lib32" "lib64")
   
   if(ICE_${upper}_LIBRARY_DEBUG OR ICE_${upper}_LIBRARY_RELEASE)
-    set(ICE_${upper}_FOUND ON CACHE STRING "The Ice ${library} library was found")
+    _ice_set_cache_string(ICE_${upper}_FOUND ON "The Ice ${library} library was found")
   endif()
 
   if(Ice_DEBUG)
@@ -66,22 +73,19 @@ function(_ice_adjust_lib_vars library)
 
   # if only the release version was found, set the debug variable also to the release version
   if(ICE_${upper}_LIBRARY_RELEASE AND NOT ICE_${upper}_LIBRARY_DEBUG)
-    set(ICE_${upper}_LIBRARY_DEBUG ${ICE_${upper}_LIBRARY_RELEASE} CACHE FILEPATH "Path to a library." FORCE)
+    _ice_set_cache_filepath(ICE_${upper}_LIBRARY_DEBUG ${ICE_${upper}_LIBRARY_RELEASE} "Path to a library.")
     set(ICE_${upper}_LIBRARY       ${ICE_${upper}_LIBRARY_RELEASE})
   endif()
 
   # if only the debug version was found, set the release variable also to the debug version
   if(ICE_${upper}_LIBRARY_DEBUG AND NOT ICE_${upper}_LIBRARY_RELEASE)
-    set(ICE_${upper}_LIBRARY_RELEASE ${ICE_${upper}_LIBRARY_DEBUG} CACHE FILEPATH "Path to a library." FORCE)
+    _ice_set_cache_filepath(ICE_${upper}_LIBRARY_RELEASE ${ICE_${upper}_LIBRARY_DEBUG} "Path to a library.")
     set(ICE_${upper}_LIBRARY         ${ICE_${upper}_LIBRARY_DEBUG})
   endif()
   
   if(ICE_${upper}_LIBRARY)
-    set(ICE_${upper}_LIBRARY ${ICE_${upper}_LIBRARY} CACHE FILEPATH "The Ice ${library} library")
+    _ice_set_cache_string(ICE_${upper}_LIBRARY ${ICE_${upper}_LIBRARY} "The Ice ${library} library")
   endif()
-
-  # Make variables changeble to the advanced user
-  mark_as_advanced(ICE_${upper}_LIBRARY ICE_${upper}_LIBRARY_RELEASE ICE_${upper}_LIBRARY_DEBUG)
 endfunction()
 
 if(NOT ICE_DIR)
@@ -205,13 +209,6 @@ if(NOT ICE_DIR)
       _ice_set_cache_string(ICE_CXX_FLAGS "-isystem ${ICE_INCLUDE_DIR}" "Ice-specific compiler flags")
     endif()
 
-    if(WIN32)
-      set(_ice_debug_suffix "d")
-    endif()
-
-    _ice_find_library(Ice)
-    _ice_adjust_lib_vars(Ice)
-
   endif()
 
   find_package_handle_standard_args(Ice DEFAULT_MSG ICE_DIR ICE_SLICE_DIR ICE_INCLUDE_DIR)

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


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list