[asterisk-scf-commits] asterisk-scf/integration/cmake.git branch "disintegrated-build" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 17 14:15:41 CDT 2011


branch "disintegrated-build" has been updated
  discards  0dde9ec8053a53626d56a38b0fc282b7e1589092 (commit)
  discards  97a9bbc7874612f35b47e2067bec937c201f395b (commit)
  discards  0f67d364f49cfb4e0c8351a37de7035ca1cb84e5 (commit)
  discards  511a822b3c569cb07c5f5f0712c925f9890c0e5d (commit)
  discards  1a08a1b3160492d844621bc176099953fc8b095a (commit)
  discards  dd47b0f4d2ffc34b0320708f73d74dde031a1bbe (commit)
  discards  59f28cd006a442312375e2366a22e90730bafac9 (commit)
  discards  3c5bc4cc404a86074860741767ea394556240183 (commit)
  discards  2997fd659feef09abd5026bbfc5ba953009cf266 (commit)
  discards  57d18b7364c3b21cccba9b4943ed3548793fb222 (commit)
  discards  b2263b87ad918069db591ef5544727cbde1d3164 (commit)
  discards  255f664cfbe307a95e505fbec025557e20fa9d6d (commit)
  discards  8b47c31cb7aac1869ba26e0907f959adefa3632b (commit)
  discards  c7a3a25c46cd34e0c6a8fcc351f3954095227d07 (commit)
  discards  9f299cd33890cc3b0bcb74827df19071ba6fbc97 (commit)
  discards  f8e2b303b43313a606b4fe09d3f8ec6922b73cf4 (commit)
  discards  16474a2c13d3fd8cba97a93cce76d0c97bf6b024 (commit)
  discards  52e5f9a881424352b90a317dc58091f7198c7138 (commit)
  discards  caf0a2f99e042f8678329e96e814d9d0be11940b (commit)
  discards  386a846b2d4b7925280fd0dbd9dcdf807c6bcf9f (commit)
  discards  2315ff8dfdd22d24c34ac53118d60c0172459174 (commit)
  discards  4fc232c9d65eb1c74ba56a0dc9e3db8c7a9ae0be (commit)
  discards  1cb01936e862320af16fc9dbf9392f67cbcc450a (commit)
  discards  323b4c8729907dbff60cff95f2115a37c3588d26 (commit)
       via  a96dd3658a0f95a2fefe77bcb65905ab2e2019ba (commit)
       via  6361a405ed365f5d5c70f3e507afffff9851f62f (commit)
       via  af73b4c0eed57180257336641b83be07ac8d0a62 (commit)
       via  df62a68703f9c80b2bad888dda3b739860a6f79d (commit)
       via  1b812c36754f0a85856c61f16899232f81ff0fc9 (commit)
       via  b5b9a1bb420ad836744d90799618f5d13ea58d68 (commit)
       via  700b3ed752084625fb5d638f2c3b2dbcbdfe356d (commit)
       via  4353dabef3a6599a07d32c8f86c8a138e0ba51c7 (commit)
       via  62977bc8bf24a29355caddb274e8b15db256d885 (commit)
       via  ed9224e3705d15c916a63a083c1b494e2b9b28d6 (commit)
       via  b5567de5ab05f63fece29363b43c72563d713a71 (commit)
       via  c9f4ffc9a7c90dbae4fbd4ff0ba81bd3c14317d9 (commit)
       via  4f089f19b7fa0573a284b9f3efb2b0216173d27b (commit)
       via  5c7f0cd66c091081d5d6df863ac4a0a54ee9f3dd (commit)
       via  5bdb40a05b6e7d080d507d81e17edd25bfa1b8ce (commit)
       via  070b81a3427d1981dfcfbe472aed1e255e7c38df (commit)
       via  cf1d59636fb93f04b71c4a6d73ac17eadb276b63 (commit)
       via  eee6ecfce5cda37eaf4d890ee460a708211e3cb0 (commit)
       via  697a42409dccb3e5860275919f8866a44e6b902a (commit)
       via  8400369ca17b7a812b04074efdb05e620c82d14d (commit)
       via  0773dbe6d744892c93fedc0bb53a3d2669bfe9a1 (commit)
       via  8aced3ef48fd6644d7c63a27d45860bf361eddb6 (commit)
       via  acc65d208cdf7bfb55612db75370730b8ca9585a (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0dde9ec8053a53626d56a38b0fc282b7e1589092)
            \
             N -- N -- N (a96dd3658a0f95a2fefe77bcb65905ab2e2019ba)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Summary of changes:


- Log -----------------------------------------------------------------
commit a96dd3658a0f95a2fefe77bcb65905ab2e2019ba
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 17 11:45:06 2011 -0500

    Automatically add 'include' subdirectory to search path.
    
    If a project has a subdirectory named 'include', astscf_project() will now
    automatically add it to the include file search path for that project's
    directory and subdirectories.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index b2cdefa..70fa132 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -273,6 +273,12 @@ endmacro()
 
 # Function which initializes project specific things
 function(astscf_project NAME ICE_VERSION)
+  message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
+
+  if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include")
+    include_directories(include)
+  endif()
+
   if(ASTSCF_MASTER_PROJECT)
     # this is a sub-project, so just record the name and
     # move on
@@ -290,8 +296,6 @@ function(astscf_project NAME ICE_VERSION)
     set(ASTSCF_MASTER_PROJECT true PARENT_SCOPE)
   endif()
 
-  message(STATUS "Setting up project ${NAME} for Ice version ${ICE_VERSION}")
-
   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" PARENT_SCOPE)
   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" PARENT_SCOPE)
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin" PARENT_SCOPE)

commit 6361a405ed365f5d5c70f3e507afffff9851f62f
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 17 07:43:36 2011 -0500

    Update the one WIN32-specific call to __astscf_set_cache_string().

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index d83d3f6..b2cdefa 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -310,7 +310,7 @@ function(astscf_project NAME ICE_VERSION)
   # On Windows, 'debug' libraries should have a "d" suffix to indicate that they
   # are debug libraries
   if(WIN32)
-    __astscf_set_cache_string(CMAKE_DEBUG_POSTFIX "d")
+    __astscf_set_cache_string(CMAKE_DEBUG_POSTFIX "d" "" ADVANCED)
   endif()
 
   message(STATUS "Performing requirement checks for components")

commit af73b4c0eed57180257336641b83be07ac8d0a62
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Jun 16 17:09:43 2011 -0500

    Provide ability to automatically translate Slice files when needed.
    
    When a Slice file is added to a component (to be translated and compiled),
    other Slice files that it is dependent on may also need to be added to the
    component. This patch adds automatic addition of dependency Slice files. See
    the documentation for astscf_component_add_slices() to understand when this
    function is performed and why.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 8887518..d83d3f6 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -322,7 +322,7 @@ function(astscf_project NAME ICE_VERSION)
   # every component against those libraries at minimum
   set(ASTSCF_ICE_LIBRARIES ICE ICEUTIL PARENT_SCOPE)
 
-  astscf_slice_collection(GLOBAL NAME Ice PATH "${ICE_SLICE_DIR}" HEADERS "${ICE_INCLUDE_DIR}")
+  astscf_slice_collection(GLOBAL NOTRANSLATE NAME Ice PATH "${ICE_SLICE_DIR}" HEADERS "${ICE_INCLUDE_DIR}")
   astscf_slice_include_collection(Ice)
   set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
 
@@ -508,20 +508,25 @@ endfunction()
 # collection's details.
 #
 # Syntax:
-# astscf_slice_collection([OVERRIDE] [GLOBAL NAME <name> | LOCAL]
+# astscf_slice_collection([OVERRIDE] [GLOBAL NAME <name> | LOCAL] [TRANSLATE | NOTRANSLATE]
 #                         [PATH <path>] [LIBRARY <library] [HEADERS <path>])
 #
 # GLOBAL: defines a global collection; NAME is mandatory
 # LOCAL: (default) defines a local collection; NAME will be 'LOCAL'
 # OVERRIDE: must be specified in order to change PATH, LIBRARY or HEADERS
 #           for a previously-defined global collection
+# TRANSLATE: (default, unless the collection provides a library) Slice files
+#            in this collection should be translated into header/source files
+#            when used in a component
+# NOTRANSLATE: (default if the collection provides a library) Slice files in
+#              this collection should not be translated
 # NAME: name of the collection
 # PATH: path to the directory where the Slice files are located
 # HEADERS: path to the directory where Slice-generated headers are located
 # LIBRARY: path or target name of a library built from Slice-generated sources
 #
 function(astscf_slice_collection)
-  cmake_parse_arguments("" "OVERRIDE;GLOBAL;LOCAL" "NAME;PATH;LIBRARY;HEADERS" "" ${ARGN})
+  cmake_parse_arguments("" "OVERRIDE;GLOBAL;LOCAL;TRANSLATE;NOTRANSLATE" "NAME;PATH;LIBRARY;HEADERS" "" ${ARGN})
   if(_GLOBAL AND NOT _NAME)
     message(FATAL_ERROR "NAME argument to this function is mandatory for global Slice collections.")
   endif()
@@ -547,6 +552,9 @@ function(astscf_slice_collection)
     message(FATAL_ERROR "PATH argument to this function is mandatory.")
   endif()
   if(_GLOBAL)
+    list(APPEND collections ${_NAME} ${SLICE_GLOBAL_COLLECTIONS})
+    list(REMOVE_DUPLICATES collections)
+    __astscf_set_cache_string(SLICE_GLOBAL_COLLECTIONS "${collections}" "" ADVANCED)
     if(_PATH)
       __astscf_set_cache_path(SLICE_COLLECTION_${_NAME} "${real}" "Path to Slice files in collection ${_NAME}.")
     endif()
@@ -556,6 +564,11 @@ function(astscf_slice_collection)
     if(_HEADERS)
       __astscf_set_cache_path(SLICE_COLLECTION_${_NAME}_HEADERS "${_HEADERS}" "Path to generated headers for Slice collection ${_NAME}.")
     endif()
+    if(_NOTRANSLATE OR SLICE_COLLECTION_${_NAME}_LIBRARY)
+      __astscf_set_cache_string(SLICE_COLLECTION_${_NAME}_TRANSLATE "false" "" ADVANCED)
+    else()
+      __astscf_set_cache_string(SLICE_COLLECTION_${_NAME}_TRANSLATE "true" "" ADVANCED)
+    endif()
     message(STATUS "Added Slice collection '${_NAME}' at ${_PATH}")
   else()
     if(_PATH)
@@ -621,7 +634,12 @@ endfunction()
 
 # Function which records Slice files, from a collection, as being used by a
 # component. The Slice files will be translated and compiled when the component
-# is built.
+# is built. In addition, any Slice files that the specified files are dependent
+# on (via #include) that come from Slice collections which don't provide
+# libraries (or have been marked explicitly as needing translation) will also be
+# added to the component automatically. This will also occur for any Slice files
+# from the same collection as the specified files, even if that collection does
+# provide a library or has not been marked as needing translation.
 #
 # The Slice files are passed in as a list of globs, relative to the collection's
 # base directory.  The globs default to regular non-recursive expansion. If you
@@ -664,7 +682,10 @@ function(astscf_component_add_slices COMPONENT COLLECTION)
     endif()
   endif()
 
+  __astscf_slice_compiler_arguments(slice_compiler_arguments)
+
   set(collection_dir "${SLICE_COLLECTION_${COLLECTION}}")
+  set(collections ${${COMPONENT}_SLICE_COLLECTIONS})
   # default to glob syntax by default. not as useful as GLOB_RECURSE, but
   # follows the principle of least surprise
   set(glob_style GLOB)
@@ -678,70 +699,74 @@ function(astscf_component_add_slices COMPONENT COLLECTION)
       if(NOT slices)
 	message(FATAL_ERROR "Pattern '${slice_glob}' did not match any files in ${collection_dir}.")
       endif()
-      if(NOT found)
-	set(collections ${${COMPONENT}_SLICE_COLLECTIONS})
+      # if the component isn't already using any Slice files from this collection,
+      # record this collection in the list
+      list(FIND collections ${COLLECTION} index)
+      if(index EQUAL -1)
 	list(APPEND collections ${COLLECTION})
-	list(REMOVE_DUPLICATES collections)
-	__astscf_set_cache_string(${COMPONENT}_SLICE_COLLECTIONS "${collections}" "" ADVANCED)
       endif()
-      set(found true)
-      list(APPEND all_slices ${slices})
+      foreach(slice ${slices})
+	message(STATUS "Adding ${slice} from collection ${COLLECTION} to ${COMPONENT}")
+      endforeach()
+      list(APPEND new_slices ${slices})
     endif()
   endforeach()
-  list(APPEND all_slices ${${COMPONENT}_${COLLECTION}_SLICES})
+  list(APPEND all_slices ${${COMPONENT}_${COLLECTION}_SLICES} ${new_slices})
   list(REMOVE_DUPLICATES all_slices)
   __astscf_set_cache_string(${COMPONENT}_${COLLECTION}_SLICES "${all_slices}" "" ADVANCED)
+  # now use the Slice compiler to find Slice files that the ones that were just added are dependent on
+  foreach(slice ${new_slices})
+    __astscf_slice_get_targets_and_sources(${COLLECTION} "${collection_dir}" "${slice}" "${slice_compiler_arguments}" targets sources)
+    foreach(source ${sources})
+      # check to see if a dependency Slice file is located in a known collection; if so, then
+      # it might also need to be added to this component
+      foreach(collection ${SLICE_GLOBAL_COLLECTIONS} PROJECT LOCAL)
+	# the dependency file should be also be added to this component (to be translated)
+	# if the collection it comes from is marked to cause translation, *or* if it
+	# comes from the same collection as the one which is dependent on it
+	if(SLICE_COLLECTION_${collection}_TRANSLATE OR (collection STREQUAL COLLECTION))
+	  # check the initial parts of the path to the dependency file against the collection's
+	  # Slice file directory path
+	  if(SLICE_COLLECTION_${collection} AND ("${source}" MATCHES "${SLICE_COLLECTION_${collection}}/(.+)"))
+	    list(FIND ${COMPONENT}_${collection}_SLICES ${CMAKE_MATCH_1} index)
+	    if(index EQUAL -1)
+	      message(STATUS "Auto-adding ${CMAKE_MATCH_1} from collection ${collection} to ${COMPONENT}")
+	      # if the component isn't already using any Slice files from this collection,
+	      # record this collection in the list
+	      list(FIND collections ${collection} index)
+	      if(index EQUAL -1)
+		list(APPEND collections ${collection})
+	      endif()
+	      list(APPEND new_slices_${collection} ${CMAKE_MATCH_1})
+	    endif()
+	  endif()
+	endif()
+      endforeach()
+    endforeach()
+  endforeach()
+  # now append all the auto-discovered Slice files to the appropriate lists for this component
+  foreach(collection ${SLICE_GLOBAL_COLLECTIONS} PROJECT LOCAL)
+    if(new_slices_${collection})
+      unset(all_slices)
+      list(APPEND all_slices ${${COMPONENT}_${collection}_SLICES} ${new_slices_${collection}})
+      list(REMOVE_DUPLICATES all_slices)
+      __astscf_set_cache_string(${COMPONENT}_${collection}_SLICES "${all_slices}" "" ADVANCED)
+    endif()
+  endforeach()
+  list(REMOVE_DUPLICATES collections)
+  __astscf_set_cache_string(${COMPONENT}_SLICE_COLLECTIONS "${collections}" "" ADVANCED)
 endfunction()
 
-# Function which add a Slice file to a component. This handles all the magic of
-# creating the rules to run slice2cpp, adding the generated headers to the
-# include path, adding the generated .cpp file to the component, etc. The
-# generated files are placed in ${CMAKE_CURRENT_BINARY_DIR}/slice-<collection>.
+# Function which uses the Slice translator to discover the files that a particular Slice
+# file depends on, and the files the translator would generate from that Slice file. The
+# TARGETS argument specifies the name of a variable that will receive the list of generated
+# files; the SOURCES argument specifies the name of a variable that will receive the list
+# of dependency files.
 #
-function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SLICE)
-  # Append the needed include directories for Slice definitions
-  foreach(include ${SLICE_INCLUDE_DIRECTORIES})
-    list(APPEND slice_compiler_arguments "-I${include}")
-  endforeach()
-
-  # Set some common Slice translator options:
-  # - generate support for the Ice streaming interface
-  # - generate checksums for definitions
-  # - allow underscores to be used in identifiers
-  list(APPEND slice_compiler_arguments "--stream" "--checksum" "--underscore")
-
-  # If any Slice plugins are to be used, include them in the
-  # compiler arguments
-  if(SLICE_PLUGINS)
-    foreach(plugin ${SLICE_PLUGINS})
-      list(APPEND slice_compiler_arguments "--plugin=${plugin}")
-    endforeach()
-  endif()
-
-  get_filename_component(slice_basename "${SLICE}" NAME_WE)
-  get_filename_component(slice_subdir "${SLICE}" PATH)
-
-  message(STATUS "Adding ${SLICE} from collection ${COLLECTION} to ${COMPONENT}")
-  # compute the directory in which to put the generated code and header files
-  set(slice_out_collection_dir "${CMAKE_CURRENT_BINARY_DIR}/${COMPONENT}/slice-${COLLECTION}")
-  if(slice_subdir)
-    set(slice_out_file_dir "${slice_out_collection_dir}/${slice_subdir}")
-  else()
-    set(slice_out_file_dir "${slice_out_collection_dir}")
-  endif()
-  # header files that refer to the one generated from this Slice file
-  # will try to find it from the base of the collection, so add that
-  # directory to the include path
-  include_directories(SYSTEM "${slice_out_collection_dir}")
-  # the C++ source file generated from this Slice file will try to find
-  # the generated header in the same directory as the source, so add
-  # the file's immediate directory to the include path as well
-  include_directories(SYSTEM "${slice_out_file_dir}")
-
-  # Determine this Slice file's dependencies
-  message(STATUS "Determining dependencies for ${SLICE}")
+function(__astscf_slice_get_targets_and_sources COLLECTION COLLECTION_DIR SLICE COMPILER_ARGS TARGETS SOURCES)
+  message(STATUS "Determining dependencies for ${SLICE} from ${COLLECTION}")
   execute_process(
-    COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} --depend ${COLLECTION_DIR}/${SLICE}
+    COMMAND ${SLICE_COMPILER} ${COMPILER_ARGS} --depend ${COLLECTION_DIR}/${SLICE}
     OUTPUT_VARIABLE raw_dependencies
     ERROR_VARIABLE slice_errors)
   if(slice_errors)
@@ -772,23 +797,41 @@ function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SL
       list(APPEND expsources ${dep_sources})
     endforeach()
   endif()
-
   foreach(source ${expsources})
     # put the spaces back in.
     string(REPLACE "%20%" " " source ${source})
     list(APPEND sources ${source})
   endforeach()
 
-  # prepend the slice_out_dir to the targets
-  foreach(target ${targets})
-    list(APPEND generated_files "${slice_out_file_dir}/${target}")
+  if(targets)
+    get_filename_component(slice_basename "${SLICE}" NAME_WE)
+    list(APPEND targets "${slice_basename}.h")
+    list(REMOVE_DUPLICATES targets)
+    list(SORT targets)
+    set(${TARGETS} ${targets} PARENT_SCOPE)
+  endif()
+
+  if(sources)
+    list(SORT sources)
+    set(${SOURCES} ${sources} PARENT_SCOPE)
+  endif()
+endfunction()
+
+# Function which collects together all the arguments that should be specified
+# to the Slice compiler, if it is to be executed in the current scope. The list of
+# arguments is stored in the variable named in the ARGUMENTS argument.
+#
+function(__astscf_slice_compiler_arguments ARGUMENTS)
+  # Append the needed include directories for Slice definitions
+  foreach(include ${SLICE_INCLUDE_DIRECTORIES})
+    list(APPEND slice_compiler_arguments "-I${include}")
   endforeach()
-  # you would think that would be enough, but slice2cpp doesn't generate a
-  # dep for the .h file
-  list(APPEND generated_files "${slice_out_file_dir}/${slice_basename}.h")
-  # and be resilient in case it does so in the future...
-  list(REMOVE_DUPLICATES generated_files)
-  set_source_files_properties(${generated_files} PROPERTIES GENERATED 1)
+
+  # Set some common Slice translator options:
+  # - generate support for the Ice streaming interface
+  # - generate checksums for definitions
+  # - allow underscores to be used in identifiers
+  list(APPEND slice_compiler_arguments "--stream" "--checksum" "--underscore")
 
   # create a preprocessor definition in the generated CXX files that enables
   # the generated classes to be exported from the library (only necessary on
@@ -797,6 +840,53 @@ function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SL
     list(APPEND slice_compiler_arguments "--dll-export" "ASTSCF_DLL_EXPORT")
   endif()
 
+  # If any Slice plugins are to be used, include them in the
+  # compiler arguments
+  if(SLICE_PLUGINS)
+    foreach(plugin ${SLICE_PLUGINS})
+      list(APPEND slice_compiler_arguments "--plugin=${plugin}")
+    endforeach()
+  endif()
+
+  set(${ARGUMENTS} ${slice_compiler_arguments} PARENT_SCOPE)
+endfunction()
+
+# Function which add a Slice file to a component. This handles all the magic of
+# creating the rules to run slice2cpp, adding the generated headers to the
+# include path, adding the generated .cpp file to the component, etc. The
+# generated files are placed in ${CMAKE_CURRENT_BINARY_DIR}/slice-<collection>.
+#
+function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SLICE)
+  __astscf_slice_compiler_arguments(slice_compiler_arguments)
+
+  get_filename_component(slice_basename "${SLICE}" NAME_WE)
+  get_filename_component(slice_subdir "${SLICE}" PATH)
+
+  # compute the directory in which to put the generated code and header files
+  set(slice_out_collection_dir "${CMAKE_CURRENT_BINARY_DIR}/${COMPONENT}/slice-${COLLECTION}")
+  if(slice_subdir)
+    set(slice_out_file_dir "${slice_out_collection_dir}/${slice_subdir}")
+  else()
+    set(slice_out_file_dir "${slice_out_collection_dir}")
+  endif()
+
+  __astscf_slice_get_targets_and_sources(${COLLECTION} "${COLLECTION_DIR}" "${SLICE}" "${slice_compiler_arguments}" targets sources)
+
+  # prepend the slice_out_dir to the targets
+  foreach(target ${targets})
+    list(APPEND generated_files "${slice_out_file_dir}/${target}")
+  endforeach()
+  set_source_files_properties(${generated_files} PROPERTIES GENERATED 1)
+
+  # header files that refer to the one generated from this Slice file
+  # will try to find it from the base of the collection, so add that
+  # directory to the include path
+  include_directories(SYSTEM "${slice_out_collection_dir}")
+  # the C++ source file generated from this Slice file will try to find
+  # the generated header in the same directory as the source, so add
+  # the file's immediate directory to the include path as well
+  include_directories(SYSTEM "${slice_out_file_dir}")
+
   file(MAKE_DIRECTORY ${slice_out_file_dir})
   add_custom_command(
     OUTPUT ${generated_files}

commit df62a68703f9c80b2bad888dda3b739860a6f79d
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Jun 15 16:36:15 2011 -0500

    Support installation of Slice collections.
    
    Add the astscf_slice_collection_install() function, which will install the
    collection's Slice files, header files and library (if they are provided).

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 5d299de..8887518 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -586,7 +586,7 @@ function(astscf_slice_include_collection COLLECTION)
   set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
   if(SLICE_COLLECTION_${COLLECTION}_HEADERS)
     set(path "${SLICE_COLLECTION_${COLLECTION}_HEADERS}")
-    message(STATUS "Using C++ headers for Slice collection ${COLLECTION} from: ${path}")
+    message(STATUS "Using C++ headers for Slice collection ${COLLECTION} from ${path}")
     # We mark the Slice include directory as a 'system' directory so that
     # the compiler will be less likely to generate warnings and/or errors
     # for the code in the generated header files.
@@ -912,44 +912,48 @@ function(astscf_component_install COMPONENT)
   if(${COMPONENT}_TYPE STREQUAL "icebox")
     install(
       TARGETS ${COMPONENT}
-      ARCHIVE DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
-      LIBRARY DESTINATION ${ASTSCF_INSTALL_ICEBOX_DIR}
-      RUNTIME DESTINATION ${ASTSCF_INSTALL_ICEBOX_DIR}
+      ARCHIVE DESTINATION "${ASTSCF_INSTALL_LIB_DIR}"
+      LIBRARY DESTINATION "${ASTSCF_INSTALL_ICEBOX_DIR}"
+      RUNTIME DESTINATION "${ASTSCF_INSTALL_ICEBOX_DIR}"
       )
   else()
     install(
       TARGETS ${COMPONENT}
-      ARCHIVE DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
-      LIBRARY DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
-      RUNTIME DESTINATION ${ASTSCF_INSTALL_BIN_DIR}
+      ARCHIVE DESTINATION "${ASTSCF_INSTALL_LIB_DIR}"
+      LIBRARY DESTINATION "${ASTSCF_INSTALL_LIB_DIR}"
+      RUNTIME DESTINATION "${ASTSCF_INSTALL_BIN_DIR}"
       )
   endif()
 endfunction()
 
-# Install generated Slice header files to their proper location
-function(astscf_slice_headers_install)
-  install(
-    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/
-    DESTINATION ${ASTSCF_INSTALL_INCLUDE_DIR}
-    FILES_MATCHING PATTERN "*.h"
-    )
-endfunction()
-
-# Install Slice files to their proper location
-function(astscf_slice_install DIR)
-  install(
-    DIRECTORY ${DIR}
-    DESTINATION ${ASTSCF_INSTALL_SLICE_DIR}
-    FILES_MATCHING PATTERN "*.ice"
-    )
+function(astscf_slice_collection_install COLLECTION)
+  if(NOT SLICE_COLLECTION_${COLLECTION})
+    message(FATAL_ERROR "Slice collection ${COLLECTION} has not been defined.")
+  endif()
+  # install Slice files
+  install(DIRECTORY "${SLICE_COLLECTION_${COLLECTION}}/"
+          DESTINATION "${ASTSCF_INSTALL_SLICE_DIR}"
+	  FILES_MATCHING
+          PATTERN "*.ice"
+         )
+  # if the collection has a library that is a target in
+  # this build, install it
+  if(SLICE_COLLECTION_${COLLECTION}_LIBRARY AND ASTSCF_COMPONENT_${SLICE_COLLECTION_${COLLECTION}_LIBRARY})
+    astscf_component_install(${SLICE_COLLECTION_${COLLECTION}_LIBRARY})
+  endif()
+  # if the collection has headers, install them
+  if(SLICE_COLLECTION_${COLLECTION}_HEADERS)
+    astscf_headers_install("${SLICE_COLLECTION_${COLLECTION}_HEADERS}/")
+  endif()
 endfunction()
 
 # Install header files to their proper location
 function(astscf_headers_install DIR)
   install(
-    DIRECTORY ${DIR}
-    DESTINATION ${ASTSCF_INSTALL_INCLUDE_DIR}
-    FILES_MATCHING PATTERN "*.h"
+    DIRECTORY "${DIR}"
+    DESTINATION "${ASTSCF_INSTALL_INCLUDE_DIR}"
+    FILES_MATCHING
+    PATTERN "*.h"
     )
 endfunction()
 

commit 1b812c36754f0a85856c61f16899232f81ff0fc9
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 14 17:41:27 2011 -0500

    Allow library type specific in astscf_build_library().
    
    astscf_build_library() can now be told to build a STATIC, SHARED or MODULE
    library; astscf_set_libtype() has been removed.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c225053..5d299de 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -877,21 +877,29 @@ function(astscf_component_build_standalone COMPONENT)
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
 
-function(astscf_set_libtype COMPONENT TYPE)
-  set("${COMPONENT}_LIBTYPE" ${TYPE} PARENT_SCOPE)
-endfunction()
-
 function(astscf_component_build_library COMPONENT)
+  cmake_parse_arguments("" "SHARED;STATIC;MODULE" "" "" ${ARGN})
   if(NOT ASTSCF_${COMPONENT})
     message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
   endif()
-  message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
+  if(NOT (_SHARED OR _STATIC OR _MODULE))
+    set(libtype SHARED)
+  elseif(_SHARED AND NOT (_STATIC OR _MODULE))
+    set(libtype SHARED)
+  elseif(_STATIC AND NOT (_SHARED OR _MODULE))
+    set(libtype STATIC)
+  elseif(_MODULE AND NOT (_SHARED OR _STATIC))
+    set(libtype MODULE)
+  else()
+    message(FATAL_ERROR "Only one of STATIC, SHARED or MODULE may be specified.")
+  endif()
+  message(STATUS "Building component ${COMPONENT} as a ${libtype} library")
   __astscf_set_cache_string(${COMPONENT}_TYPE library "" ADVANCED)
   __astscf_component_slices(${COMPONENT})
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
-  add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
+  add_library(${COMPONENT} ${libtype} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()

commit b5b9a1bb420ad836744d90799618f5d13ea58d68
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 14 17:30:59 2011 -0500

    Remove unnecessary variable references.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index d888eeb..c225053 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -856,7 +856,7 @@ function(astscf_component_build_icebox COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the shared module
-  add_library(${COMPONENT} MODULE ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
+  add_library(${COMPONENT} MODULE ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
@@ -872,7 +872,7 @@ function(astscf_component_build_standalone COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
-  add_executable(${COMPONENT} ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
+  add_executable(${COMPONENT} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
@@ -891,7 +891,7 @@ function(astscf_component_build_library COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
-  add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
+  add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()

commit 700b3ed752084625fb5d638f2c3b2dbcbdfe356d
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 14 17:07:17 2011 -0500

    Add initial support for Slice file 'collections'.
    
    Adds various functions to handle collections of Slice-defined interfaces in
    an easy-to-use manner; this insulates the scripts that build components
    from having to know the actual paths where Slice files, headers files and
    libraries are located.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index b816283..d888eeb 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -184,6 +184,8 @@ endif()
 include(CTest)
 enable_testing()
 
+include(CMakeParseArguments)
+
 if(UNIX AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_custom_target(update COMMAND git pull WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMENT "Updating clone")
   add_custom_target(pull COMMAND git pull WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMENT "Updating clone")
@@ -320,15 +322,8 @@ function(astscf_project NAME ICE_VERSION)
   # every component against those libraries at minimum
   set(ASTSCF_ICE_LIBRARIES ICE ICEUTIL PARENT_SCOPE)
 
-  message(STATUS "Using Ice C++ headers from: ${ICE_INCLUDE_DIR}")
-  # We mark the Ice include directory as a 'system' directory so that
-  # the compiler will be less likely to generate warnings and/or errors
-  # for the code in the Ice header files.
-  include_directories(SYSTEM "${ICE_INCLUDE_DIR}")
-
-  set(SLICE_COLLECTION_Ice "${ICE_SLICE_DIR}")
-  list(APPEND SLICE_INCLUDE_DIRECTORIES "${ICE_SLICE_DIR}")
-  list(REMOVE_DUPLICATES SLICE_INCLUDE_DIRECTORIES)
+  astscf_slice_collection(GLOBAL NAME Ice PATH "${ICE_SLICE_DIR}" HEADERS "${ICE_INCLUDE_DIR}")
+  astscf_slice_include_collection(Ice)
   set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
 
   # threading support required
@@ -427,20 +422,6 @@ macro(__astscf_ensure_abs_paths pathlist)
   set(${pathlist} ${eap_temp})
 endmacro()
 
-# Function which remembers Slice plugins to be used for all targets in the
-# current directory and below
-function(astscf_slice_plugins)
-  if(NOT ARGN)
-    message(FATAL_ERROR "You must pass at least one plugin to this function")
-  endif()
-  set(plugins ${SLICE_PLUGINS})
-  foreach(plugin ${ARGN})
-    list(APPEND plugins ${plugin})
-  endforeach()
-  list(REMOVE_DUPLICATES plugins)
-  set(SLICE_PLUGINS ${plugins} PARENT_SCOPE)
-endfunction()
-
 # Function which initializes a component for building
 function(astscf_component_init COMPONENT)
   message(STATUS "Setting up to build component ${COMPONENT}")
@@ -503,22 +484,144 @@ function(astscf_component_add_ice_libraries COMPONENT)
   __astscf_set_cache_string(${COMPONENT}_ICE_LIBRARIES "${libs}" "" ADVANCED)
 endfunction()
 
-function(astscf_slice_collection COLLECTION PATH)
-  get_filename_component(real "${PATH}" REALPATH)
-  set(SLICE_COLLECTION_${COLLECTION} "${real}" PARENT_SCOPE)
-  message(STATUS "Added Slice collection '${COLLECTION}' at ${PATH}")
+# Function which remembers Slice plugins to be used for all targets in the
+# current directory and below
+function(astscf_slice_plugins)
+  if(NOT ARGN)
+    message(FATAL_ERROR "You must pass at least one plugin to this function")
+  endif()
+  set(plugins ${SLICE_PLUGINS})
+  foreach(plugin ${ARGN})
+    list(APPEND plugins ${plugin})
+  endforeach()
+  list(REMOVE_DUPLICATES plugins)
+  set(SLICE_PLUGINS ${plugins} PARENT_SCOPE)
+endfunction()
+
+# Function which defines a 'collection' of Slice interfaces; the collection
+# will consist of one or more Slice files, and optionally header/source files
+# generated in C++ from them, also optionally a compiled library produced
+# from the generated sources. Both global and local collections are supported;
+# local collections are unnamed and visible only to the directory they are defined
+# in and below. This function can be called more than once for the same global
+# collection if desired, using the 'OVERRIDE' flag, in order to 'update' the
+# collection's details.
+#
+# Syntax:
+# astscf_slice_collection([OVERRIDE] [GLOBAL NAME <name> | LOCAL]
+#                         [PATH <path>] [LIBRARY <library] [HEADERS <path>])
+#
+# GLOBAL: defines a global collection; NAME is mandatory
+# LOCAL: (default) defines a local collection; NAME will be 'LOCAL'
+# OVERRIDE: must be specified in order to change PATH, LIBRARY or HEADERS
+#           for a previously-defined global collection
+# NAME: name of the collection
+# PATH: path to the directory where the Slice files are located
+# HEADERS: path to the directory where Slice-generated headers are located
+# LIBRARY: path or target name of a library built from Slice-generated sources
+#
+function(astscf_slice_collection)
+  cmake_parse_arguments("" "OVERRIDE;GLOBAL;LOCAL" "NAME;PATH;LIBRARY;HEADERS" "" ${ARGN})
+  if(_GLOBAL AND NOT _NAME)
+    message(FATAL_ERROR "NAME argument to this function is mandatory for global Slice collections.")
+  endif()
+  if(_LOCAL AND _NAME)
+    message(FATAL_ERROR "NAME argument to this function is not allowed for local Slice collections.")
+  endif()
+  if(_NAME STREQUAL "LOCAL")
+    message(FATAL_ERROR "'LOCAL' name for Slice collections is reserved.")
+  endif()
+  if(_NAME STREQUAL "PROJECT")
+    message(FATAL_ERROR "'LOCAL' name for Slice collections is reserved.")
+  endif()
+  if(_LIBRARY)
+    if(_GLOBAL AND NOT (_HEADERS OR SLICE_COLLECTION_${_NAME}_HEADERS))
+      message(FATAL_ERROR "A collection with a library must also provide headers.")
+    elseif(_LOCAL AND NOT (_HEADERS OR SLICE_COLLECTION_LOCAL_HEADERS))
+      message(FATAL_ERROR "A collection with a library must also provide headers.")
+    endif()
+  endif()
+  if(_PATH)
+    get_filename_component(real "${_PATH}" REALPATH)
+  elseif(NOT (_OVERRIDE AND _GLOBAL AND SLICE_COLLECTION_${_NAME}))
+    message(FATAL_ERROR "PATH argument to this function is mandatory.")
+  endif()
+  if(_GLOBAL)
+    if(_PATH)
+      __astscf_set_cache_path(SLICE_COLLECTION_${_NAME} "${real}" "Path to Slice files in collection ${_NAME}.")
+    endif()
+    if(_LIBRARY)
+      __astscf_set_cache_string(SLICE_COLLECTION_${_NAME}_LIBRARY "${_LIBRARY}" "Library of generated code for Slice collection ${_NAME}.")
+    endif()
+    if(_HEADERS)
+      __astscf_set_cache_path(SLICE_COLLECTION_${_NAME}_HEADERS "${_HEADERS}" "Path to generated headers for Slice collection ${_NAME}.")
+    endif()
+    message(STATUS "Added Slice collection '${_NAME}' at ${_PATH}")
+  else()
+    if(_PATH)
+      set(SLICE_COLLECTION_LOCAL "${real}" PARENT_SCOPE)
+    endif()
+    if(_LIBRARY)
+      set(SLICE_COLLECTION_LOCAL_LIBRARY "${_LIBRARY}" PARENT_SCOPE)
+    endif()
+    if(_HEADERS)
+      set(SLICE_COLLECTION_LOCAL_HEADERS "${_HEADERS}" PARENT_SCOPE)
+    endif()
+    message(STATUS "Added local Slice collection at ${_PATH}")
+  endif()
 endfunction()
 
+# Function which makes the Slice files and header files from a collection
+# available to components in the current directory and below. The collection's
+# Slice file directory is added to SLICE_INCLUDE_DIRECTORIES (for later use
+# by the Slice translator), and the collection's header files directory
+# (if any) is added as a 'system' include directory for compilations.
+#
 function(astscf_slice_include_collection COLLECTION)
+  if(NOT SLICE_COLLECTION_${COLLECTION})
+    message(FATAL_ERROR "Slice collection ${COLLECTION} has not been defined.")
+  endif()
   list(APPEND SLICE_INCLUDE_DIRECTORIES "${SLICE_COLLECTION_${COLLECTION}}")
   list(REMOVE_DUPLICATES SLICE_INCLUDE_DIRECTORIES)
   set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
+  if(SLICE_COLLECTION_${COLLECTION}_HEADERS)
+    set(path "${SLICE_COLLECTION_${COLLECTION}_HEADERS}")
+    message(STATUS "Using C++ headers for Slice collection ${COLLECTION} from: ${path}")
+    # We mark the Slice include directory as a 'system' directory so that
+    # the compiler will be less likely to generate warnings and/or errors
+    # for the code in the generated header files.
+    include_directories(SYSTEM "${path}")
+  endif()
 endfunction()
 
-# Adds Slice files from a collection to a target. This handles all the magic of
-# creating the rules to run slice2cpp, adding the generated headers to the
-# include path, adding the generated .cpp file to the component, etc. The
-# generated files are placed in ${CMAKE_CURRENT_BINARY_DIR}/slice-<collection>.
+# Function which links the library associated with a Slice collection into
+# a component.
+#
+function(astscf_component_add_slice_collection_libraries COMPONENT)
+  if(NOT ARGN)
+    message(FATAL_ERROR "You must pass at least one Slice collection to this function")
+  endif()
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
+  set(libs ${${COMPONENT}_SLICE_LIBRARIES})
+  foreach(lib ${ARGN})
+    if(NOT SLICE_COLLECTION_${lib})
+      message(FATAL_ERROR "Slice collection ${lib} has not been defined.")
+    endif()
+    if(NOT SLICE_COLLECTION_${lib}_LIBRARY)
+      message(FATAL_ERROR "Slice collection ${lib} does not provide a library.")
+    endif()
+    message(STATUS "Linking component ${COMPONENT} to library from Slice collection ${lib}")
+    list(APPEND libs ${lib})
+  endforeach()
+  list(REMOVE_DUPLICATES libs)
+  __astscf_set_cache_string(${COMPONENT}_SLICE_LIBRARIES "${libs}" "" ADVANCED)
+endfunction()
+
+# Function which records Slice files, from a collection, as being used by a
+# component. The Slice files will be translated and compiled when the component
+# is built.
 #
 # The Slice files are passed in as a list of globs, relative to the collection's
 # base directory.  The globs default to regular non-recursive expansion. If you
@@ -529,6 +632,7 @@ endfunction()
 #
 # See http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:file for more
 # details on the globbing syntax.
+#
 function(astscf_component_add_slices COMPONENT COLLECTION)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one Slice file to this function")
@@ -571,14 +675,29 @@ function(astscf_component_add_slices COMPONENT COLLECTION)
     else()
       # expand the glob into a list of files
       file(${glob_style} slices RELATIVE "${collection_dir}" "${collection_dir}/${slice_glob}")
-      foreach(slice ${slices})
-        __astscf_component_add_one_slice(${COMPONENT} "${COLLECTION}" "${collection_dir}" "${slice}")
-      endforeach()
+      if(NOT slices)
+	message(FATAL_ERROR "Pattern '${slice_glob}' did not match any files in ${collection_dir}.")
+      endif()
+      if(NOT found)
+	set(collections ${${COMPONENT}_SLICE_COLLECTIONS})
+	list(APPEND collections ${COLLECTION})
+	list(REMOVE_DUPLICATES collections)
+	__astscf_set_cache_string(${COMPONENT}_SLICE_COLLECTIONS "${collections}" "" ADVANCED)
+      endif()
+      set(found true)
+      list(APPEND all_slices ${slices})
     endif()
   endforeach()
-  __astscf_set_cache_string(${COMPONENT}_SLICES "${${COMPONENT}_SLICES}" "" ADVANCED)
+  list(APPEND all_slices ${${COMPONENT}_${COLLECTION}_SLICES})
+  list(REMOVE_DUPLICATES all_slices)
+  __astscf_set_cache_string(${COMPONENT}_${COLLECTION}_SLICES "${all_slices}" "" ADVANCED)
 endfunction()
 
+# Function which add a Slice file to a component. This handles all the magic of
+# creating the rules to run slice2cpp, adding the generated headers to the
+# include path, adding the generated .cpp file to the component, etc. The
+# generated files are placed in ${CMAKE_CURRENT_BINARY_DIR}/slice-<collection>.
+#
 function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SLICE)
   # Append the needed include directories for Slice definitions
   foreach(include ${SLICE_INCLUDE_DIRECTORIES})
@@ -620,7 +739,7 @@ function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SL
   include_directories(SYSTEM "${slice_out_file_dir}")
 
   # Determine this Slice file's dependencies
-  message(STATUS "Determining dependencies for ${slice_basename}")
+  message(STATUS "Determining dependencies for ${SLICE}")
   execute_process(
     COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} --depend ${COLLECTION_DIR}/${SLICE}
     OUTPUT_VARIABLE raw_dependencies
@@ -687,8 +806,21 @@ function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SL
     DEPENDS ${sources} ${SLICE_COMPILER})
 
   # the Slice and generated_files are now sources for the component
-  set(file_list ${${COMPONENT}_SLICES} ${COLLECTION_DIR}/${SLICE} ${generated_files})
-  set(${COMPONENT}_SLICES ${file_list} PARENT_SCOPE)
+  set(file_list ${${COMPONENT}_SOURCES} ${COLLECTION_DIR}/${SLICE} ${generated_files})
+  set(${COMPONENT}_SOURCES ${file_list} PARENT_SCOPE)
+endfunction()
+
+# Function which collects Slice files used by a component, causing them
+# to be translated, compiled and linked into the component
+#
+function(__astscf_component_slices COMPONENT)
+  foreach(collection ${${COMPONENT}_SLICE_COLLECTIONS})
+    set(collection_dir "${SLICE_COLLECTION_${collection}}")
+    foreach(slice ${${COMPONENT}_${collection}_SLICES})
+      __astscf_component_add_one_slice(${COMPONENT} ${collection} "${collection_dir}" "${slice}")
+    endforeach()
+  endforeach()
+  set(${COMPONENT}_SOURCES ${${COMPONENT}_SOURCES} PARENT_SCOPE)
 endfunction()
 
 # Function which collects libraries needed by a component
@@ -705,6 +837,9 @@ function(__astscf_component_libraries COMPONENT)
       list(APPEND target_libs "${Boost_${lib}_LIBRARY}")
     endforeach()
   endif()
+  foreach(lib ${${COMPONENT}_SLICE_LIBRARIES})
+    list(APPEND target_libs "${SLICE_COLLECTION_${lib}_LIBRARY}")
+  endforeach()
   set(component_libs ${target_libs} PARENT_SCOPE)
 endfunction()
 
@@ -717,6 +852,7 @@ function(astscf_component_build_icebox COMPONENT)
   __astscf_set_cache_string(${COMPONENT}_TYPE icebox "" ADVANCED)
   find_package(Ice REQUIRED IceBox)
   list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
+  __astscf_component_slices(${COMPONENT})
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the shared module
@@ -732,6 +868,7 @@ function(astscf_component_build_standalone COMPONENT)
   endif()
   message(STATUS "Building component ${COMPONENT} as a standalone executable")
   __astscf_set_cache_string(${COMPONENT}_TYPE standalone "" ADVANCED)
+  __astscf_component_slices(${COMPONENT})
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
@@ -750,6 +887,7 @@ function(astscf_component_build_library COMPONENT)
   endif()
   message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
   __astscf_set_cache_string(${COMPONENT}_TYPE library "" ADVANCED)
+  __astscf_component_slices(${COMPONENT})
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component

commit 4353dabef3a6599a07d32c8f86c8a138e0ba51c7
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Jun 13 15:53:59 2011 -0500

    Ensure that shared objects have no unresolved symbols.
    
    When doing builds on Linux, the linker will now ensure that all symbols
    referenced by the object files linked into the module or library are
    resolvable at link time (in other words, all libraries needed by the
    code in the module/library have been specified to the linker). If any
    symbols cannot be resolved, an error will be generated at link time (rather
    than later at run time).

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 5a6f8a6..b816283 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -369,6 +369,13 @@ function(astscf_project NAME ICE_VERSION)
     list(APPEND cxx_flags ${ICE_CXX_FLAGS})
     list(APPEND cxx_flags_debug "-Wall" "-Wextra" "-g3")
     list(APPEND cxx_flags_debug "-Wshadow" "-Wmissing-format-attribute" "-Wformat=2" "-Wpointer-arith" "-Wconversion")
+    # When building shared objects (libraries or modules), the linker normally
+    # doesn't try to ensure that all symbols referenced by the code linked
+    # into the object have been satisfied... which means that unresolved
+    # symbols won't be found until runtime. This flag tells the linker
+    # to do that resolution at link time, and report an error if a symbol
+    # is unresolved.
+    list(APPEND cxx_flags_debug "-Wl,--no-undefined")
     include(CheckCXXCompilerFlag)
     CHECK_CXX_COMPILER_FLAG(-Wlogical-op HAVE_W_LOGICAL_OP)
     if(HAVE_W_LOGICAL_OP)

commit 62977bc8bf24a29355caddb274e8b15db256d885
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 7 16:29:01 2011 -0500

    Add support for a 'make uninstall' Makefile target.
    
    Code for this target came from the CMake wiki at www.cmake.org.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0a72604..5a6f8a6 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -189,6 +189,16 @@ if(UNIX AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_custom_target(pull COMMAND git pull WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMENT "Updating clone")
 endif()
 
+configure_file(
+  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in"
+  "${CMAKE_CURRENT_BINARY_DIR}/cmake/modules/cmake_uninstall.cmake"
+  IMMEDIATE @ONLY
+  )
+add_custom_target(
+  uninstall
+  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/modules/cmake_uninstall.cmake"
+  )
+
 macro(__astscf_compute_test_paths)
   # We need to construct a PATH that will allow unit tests to be run
   # against the versions of Ice and Boost that the components and test
diff --git a/modules/cmake_uninstall.cmake.in b/modules/cmake_uninstall.cmake.in
new file mode 100644
index 0000000..9b093d4
--- /dev/null
+++ b/modules/cmake_uninstall.cmake.in
@@ -0,0 +1,22 @@
+if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+  message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+endif()
+
+file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+  set(file "$ENV{DESTDIR}${file}")
+  message(STATUS "Uninstalling ${file}")
+  if(EXISTS "${file}")
+    exec_program(
+      "@CMAKE_COMMAND@" ARGS "-E remove "${file}""
+      OUTPUT_VARIABLE rm_out
+      RETURN_VALUE rm_retval
+      )
+    if(NOT rm_retval STREQUAL 0)
+      message(STATUS "Failed to remove ${file}.")
+    endif()
+  else()
+    message(STATUS "File ${file} does not exist.")
+  endif()
+endforeach()

commit ed9224e3705d15c916a63a083c1b494e2b9b28d6
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Jun 7 08:47:16 2011 -0500

    Generate slice2cpp output in a per-component directory.
    
    If multiple components in the same source directory use the same Slice
    files, they should have separate translator output files for those Slice files.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index a6f54fb..0a72604 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -587,7 +587,7 @@ function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SL
 
   message(STATUS "Adding ${SLICE} from collection ${COLLECTION} to ${COMPONENT}")
   # compute the directory in which to put the generated code and header files
-  set(slice_out_collection_dir "${CMAKE_CURRENT_BINARY_DIR}/slice-${COLLECTION}")
+  set(slice_out_collection_dir "${CMAKE_CURRENT_BINARY_DIR}/${COMPONENT}/slice-${COLLECTION}")
   if(slice_subdir)
     set(slice_out_file_dir "${slice_out_collection_dir}/${slice_subdir}")
   else()

commit b5567de5ab05f63fece29363b43c72563d713a71
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Jun 6 18:39:34 2011 -0500

    Implement Slice file 'collections'.
    
    Major upgrade to handle Slice files in 'collections'; groups provided by
    packages or in a component directory. This greatly simplifies the path
    handling for computing the generated file locations, and will ease the
    transition towards a fully disintegrated build.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index cae209a..a6f54fb 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -266,6 +266,12 @@ function(astscf_project NAME ICE_VERSION)
     # move on
     set(ASTSCF_PROJECT "${NAME}" PARENT_SCOPE)
     set(ASTSCF_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
+    if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/slice")
+      set(SLICE_COLLECTION_PROJECT "${CMAKE_CURRENT_SOURCE_DIR}/slice" PARENT_SCOPE)
+      message(STATUS "Added project-specific Slice collection for '${NAME}' at ${CMAKE_CURRENT_SOURCE_DIR}/slice")
+      list(APPEND SLICE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/slice")
+      set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
+    endif()
     return()
   else()
     set(ASTSCF_PROJECT "MASTER" PARENT_SCOPE)
@@ -310,10 +316,10 @@ function(astscf_project NAME ICE_VERSION)
   # for the code in the Ice header files.
   include_directories(SYSTEM "${ICE_INCLUDE_DIR}")
 
-  message(STATUS "Using Ice Slice files from: ${ICE_SLICE_DIR}")
-  # We can't use astscf_slice_include_directories here because
-  # the variable it sets will only be local to this function
-  set(SLICE_INCLUDE_DIRECTORIES "${ICE_SLICE_DIR}" PARENT_SCOPE)
+  set(SLICE_COLLECTION_Ice "${ICE_SLICE_DIR}")
+  list(APPEND SLICE_INCLUDE_DIRECTORIES "${ICE_SLICE_DIR}")
+  list(REMOVE_DUPLICATES SLICE_INCLUDE_DIRECTORIES)
+  set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
 
   # threading support required
   find_package(Threads REQUIRED)
@@ -401,21 +407,9 @@ macro(__astscf_ensure_abs_paths pathlist)
     get_filename_component(newpath "${p}" REALPATH)
     list(APPEND eap_temp "${newpath}")
   endforeach()
-  list(REMOVE_DUPLICATES eap_temp)
   set(${pathlist} ${eap_temp})
 endmacro()
 
-# Function which remembers include directories needed for translating
-# Slice files in the current directory and below
-function(astscf_slice_include_directories)
-  set(paths ${ARGN})
-  if(SLICE_INCLUDE_DIRECTORIES)
-    list(INSERT paths 0 ${SLICE_INCLUDE_DIRECTORIES})
-  endif()
-  __astscf_ensure_abs_paths(paths)
-  set(SLICE_INCLUDE_DIRECTORIES ${paths} PARENT_SCOPE)
-endfunction()
-
 # Function which remembers Slice plugins to be used for all targets in the
 # current directory and below
 function(astscf_slice_plugins)
@@ -460,7 +454,7 @@ function(astscf_component_add_boost_libraries COMPONENT)
 endfunction()
 
 # Function which adds source or header files to a component to be built
-function(astscf_component_add_file COMPONENT)
+function(astscf_component_add_files COMPONENT)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one source file to this function")
   endif()
@@ -492,47 +486,43 @@ function(astscf_component_add_ice_libraries COMPONENT)
   __astscf_set_cache_string(${COMPONENT}_ICE_LIBRARIES "${libs}" "" ADVANCED)
 endfunction()
 
-# Adds Slice files to a target.  This handles all the magic of creating the
-# rules to run slice2cpp, adding the generated headers to the include path,
-# adding the generated .cpp file to the component, etc.  The generated files
-# are placed in ${CMAKE_CURRENT_BINARY_DIR}/generated.
+function(astscf_slice_collection COLLECTION PATH)
+  get_filename_component(real "${PATH}" REALPATH)
+  set(SLICE_COLLECTION_${COLLECTION} "${real}" PARENT_SCOPE)
+  message(STATUS "Added Slice collection '${COLLECTION}' at ${PATH}")
+endfunction()
+
+function(astscf_slice_include_collection COLLECTION)
+  list(APPEND SLICE_INCLUDE_DIRECTORIES "${SLICE_COLLECTION_${COLLECTION}}")
+  list(REMOVE_DUPLICATES SLICE_INCLUDE_DIRECTORIES)
+  set(SLICE_INCLUDE_DIRECTORIES ${SLICE_INCLUDE_DIRECTORIES} PARENT_SCOPE)
+endfunction()
+
+# Adds Slice files from a collection to a target. This handles all the magic of
+# creating the rules to run slice2cpp, adding the generated headers to the
+# include path, adding the generated .cpp file to the component, etc. The
+# generated files are placed in ${CMAKE_CURRENT_BINARY_DIR}/slice-<collection>.
 #
-# The Slice files are passed in as a list of globs, relative to
-# the current source directory.  The globs default to regular non-recursive
-# globs.  If you want to include subdirectories in you glob search, also
-# pass in GLOB_RECURSE.
+# The Slice files are passed in as a list of globs, relative to the collection's
+# base directory.  The globs default to regular non-recursive expansion. If you
+# want to include subdirectories in the glob search, also pass in GLOB_RECURSE.
 #
 # For example:
-#   astscf_component_add_slice(comp-name GLOB_RECURSE "*.ice")
+#   astscf_component_add_slice(comp-name ASTSCF GLOB_RECURSE "*.ice")
 #
 # See http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:file for more
 # details on the globbing syntax.
-function(astscf_component_add_slice COMPONENT)
+function(astscf_component_add_slices COMPONENT COLLECTION)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one Slice file to this function")
   endif()
   if(NOT ASTSCF_${COMPONENT})
     message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
   endif()
-  # default to glob syntax by default.  not as useful as GLOB_RECURSE, but
-  # follows the principle of least surprise
-  set(glob_style GLOB)
-  foreach(slice_glob ${ARGN})
-    if(${slice_glob} STREQUAL GLOB OR ${slice_glob} STREQUAL GLOB_RECURSE)
-      # change our globbing style
-      set(glob_style ${slice_glob})
-    else()
-      # expand the glob into a list of files
-      file(${glob_style} slices RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${slice_glob})
-      foreach(slice ${slices})
-        __astscf_component_add_one_slice(${COMPONENT} ${slice})
-      endforeach()
-    endif()
-  endforeach()
-  __astscf_set_cache_string(${COMPONENT}_SOURCES "${${COMPONENT}_SOURCES}" "" ADVANCED)
-endfunction()
+  if(NOT SLICE_COLLECTION_${COLLECTION})
+    message(FATAL_ERROR "Slice collection ${COLLECTION} has not been defined.")
+  endif()
 
-function(__astscf_component_add_one_slice COMPONENT SLICE)
   if(NOT SLICE_COMPILER)
     # Find the actual Slice compiler
     find_program(SLICE_COMPILER slice2cpp PATHS "${ICE_DIR}/bin"
@@ -545,18 +535,36 @@ function(__astscf_component_add_one_slice COMPONENT SLICE)
     else()
       message(FATAL_ERROR "Failed to find Slice compiler")
     endif()
-  endif()
 
-  if(MSVC_IDE)
-    # This makes the Slice definitions display in their own folder in the
-    # Visual Studio IDE
-    source_group("Slice Definitions" REGULAR_EXPRESSION "\\.ice$")
+    if(MSVC_IDE)
+      # This makes the Slice definitions display in their own folder in the
+      # Visual Studio IDE
+      source_group("Slice Definitions" REGULAR_EXPRESSION "\\.ice$")
+    endif()
   endif()
 
+  set(collection_dir "${SLICE_COLLECTION_${COLLECTION}}")
+  # default to glob syntax by default. not as useful as GLOB_RECURSE, but
+  # follows the principle of least surprise
+  set(glob_style GLOB)
+  foreach(slice_glob ${ARGN})
+    if(${slice_glob} STREQUAL GLOB OR ${slice_glob} STREQUAL GLOB_RECURSE)
+      # change our globbing style
+      set(glob_style ${slice_glob})
+    else()
+      # expand the glob into a list of files
+      file(${glob_style} slices RELATIVE "${collection_dir}" "${collection_dir}/${slice_glob}")
+      foreach(slice ${slices})
+        __astscf_component_add_one_slice(${COMPONENT} "${COLLECTION}" "${collection_dir}" "${slice}")
+      endforeach()
+    endif()
+  endforeach()
+  __astscf_set_cache_string(${COMPONENT}_SLICES "${${COMPONENT}_SLICES}" "" ADVANCED)
+endfunction()
+
+function(__astscf_component_add_one_slice COMPONENT COLLECTION COLLECTION_DIR SLICE)
   # Append the needed include directories for Slice definitions
   foreach(include ${SLICE_INCLUDE_DIRECTORIES})
-    # Each directory in this list will be in the source tree,
-    # which is what the Slice compiler will need
     list(APPEND slice_compiler_arguments "-I${include}")
   endforeach()
 
@@ -574,32 +582,30 @@ function(__astscf_component_add_one_slice COMPONENT SLICE)
     endforeach()
   endif()
 
-  message(STATUS "Adding ${SLICE} to ${COMPONENT}")
-  # get subdirectory slice is in
+  get_filename_component(slice_basename "${SLICE}" NAME_WE)
   get_filename_component(slice_subdir "${SLICE}" PATH)
 
-  # get the directory in which to put the generated code
-  set(slice_out_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
-  # if the slice file is in a subdirectory, maintain that structure
-  if(slice_subdir AND NOT ${slice_subdir} MATCHES "\\.\\.")
-    set(slice_out_dir "${slice_out_dir}/${slice_subdir}")
-  endif()
-  get_filename_component(slice_basename "${SLICE}" NAME_WE)
-  # headers are generated, so add them to the include path
-  # since we can't control them, treat them as system includes
-  include_directories(SYSTEM "${CMAKE_CURRENT_BINARY_DIR}/generated")
-  # generated .cpp files #include <.h> directly, which requires the out_dir
-  # itself to be in the include path
-  include_directories(SYSTEM "${slice_out_dir}")
-
-  # fully specify SLICE's path
-  set(SLICE "${CMAKE_CURRENT_SOURCE_DIR}/${SLICE}")
-
-  # Look for the dependencies for this Slice definition, we have to do it now
-  # since the target was just added
+  message(STATUS "Adding ${SLICE} from collection ${COLLECTION} to ${COMPONENT}")
+  # compute the directory in which to put the generated code and header files
+  set(slice_out_collection_dir "${CMAKE_CURRENT_BINARY_DIR}/slice-${COLLECTION}")
+  if(slice_subdir)
+    set(slice_out_file_dir "${slice_out_collection_dir}/${slice_subdir}")
+  else()
+    set(slice_out_file_dir "${slice_out_collection_dir}")
+  endif()
+  # header files that refer to the one generated from this Slice file
+  # will try to find it from the base of the collection, so add that
+  # directory to the include path
+  include_directories(SYSTEM "${slice_out_collection_dir}")
+  # the C++ source file generated from this Slice file will try to find
+  # the generated header in the same directory as the source, so add
+  # the file's immediate directory to the include path as well
+  include_directories(SYSTEM "${slice_out_file_dir}")
+
+  # Determine this Slice file's dependencies
   message(STATUS "Determining dependencies for ${slice_basename}")
   execute_process(
-    COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} --depend ${SLICE}
+    COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} --depend ${COLLECTION_DIR}/${SLICE}
     OUTPUT_VARIABLE raw_dependencies
     ERROR_VARIABLE slice_errors)
   if(slice_errors)
@@ -639,11 +645,11 @@ function(__astscf_component_add_one_slice COMPONENT SLICE)
 
   # prepend the slice_out_dir to the targets
   foreach(target ${targets})
-    list(APPEND generated_files "${slice_out_dir}/${target}")
+    list(APPEND generated_files "${slice_out_file_dir}/${target}")
   endforeach()
   # you would think that would be enough, but slice2cpp doesn't generate a
   # dep for the .h file
-  list(APPEND generated_files "${slice_out_dir}/${slice_basename}.h")
+  list(APPEND generated_files "${slice_out_file_dir}/${slice_basename}.h")
   # and be resilient in case it does so in the future...
   list(REMOVE_DUPLICATES generated_files)
   set_source_files_properties(${generated_files} PROPERTIES GENERATED 1)
@@ -655,18 +661,17 @@ function(__astscf_component_add_one_slice COMPONENT SLICE)
     list(APPEND slice_compiler_arguments "--dll-export" "ASTSCF_DLL_EXPORT")
   endif()
 
-  file(MAKE_DIRECTORY ${slice_out_dir})
+  file(MAKE_DIRECTORY ${slice_out_file_dir})
   add_custom_command(
     OUTPUT ${generated_files}
-    COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} ${SLICE}
-    --output-dir ${slice_out_dir}
+    COMMAND ${SLICE_COMPILER} ${slice_compiler_arguments} ${COLLECTION_DIR}/${SLICE}
+    --output-dir ${slice_out_file_dir}
     COMMENT "slice2cpp translating ${SLICE}"
     DEPENDS ${sources} ${SLICE_COMPILER})
 
-  # the Slice and generated_files are sources for the component
-  set(file_list ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
-  __astscf_ensure_abs_paths(file_list)
-  set(${COMPONENT}_SOURCES ${file_list} PARENT_SCOPE)
+  # the Slice and generated_files are now sources for the component
+  set(file_list ${${COMPONENT}_SLICES} ${COLLECTION_DIR}/${SLICE} ${generated_files})
+  set(${COMPONENT}_SLICES ${file_list} PARENT_SCOPE)
 endfunction()
 
 # Function which collects libraries needed by a component
@@ -698,7 +703,7 @@ function(astscf_component_build_icebox COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the shared module
-  add_library(${COMPONENT} MODULE ${${COMPONENT}_SOURCES})
+  add_library(${COMPONENT} MODULE ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
@@ -713,7 +718,7 @@ function(astscf_component_build_standalone COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
-  add_executable(${COMPONENT} ${${COMPONENT}_SOURCES})
+  add_executable(${COMPONENT} ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
@@ -731,7 +736,7 @@ function(astscf_component_build_library COMPONENT)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
-  add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
+  add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SLICES} ${${COMPONENT}_SOURCES})
   # Link required libraries
   target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()

commit c9f4ffc9a7c90dbae4fbd4ff0ba81bd3c14317d9
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 17:18:34 2011 -0500

    Ensure that all source file paths for a component are absolute.
    
    Slice file paths, and paths to files generated by the Slice translator,
    should be absolute and unique within the list of sources for a component.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 190be3e..cae209a 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -523,9 +523,7 @@ function(astscf_component_add_slice COMPONENT)
       set(glob_style ${slice_glob})
     else()
       # expand the glob into a list of files
-      file(${glob_style} slices RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
-        ${slice_glob})
-
+      file(${glob_style} slices RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${slice_glob})
       foreach(slice ${slices})
         __astscf_component_add_one_slice(${COMPONENT} ${slice})
       endforeach()
@@ -666,8 +664,9 @@ function(__astscf_component_add_one_slice COMPONENT SLICE)
     DEPENDS ${sources} ${SLICE_COMPILER})
 
   # the Slice and generated_files are sources for the component
-  list(APPEND ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
-  set(${COMPONENT}_SOURCES ${${COMPONENT}_SOURCES} PARENT_SCOPE)
+  set(file_list ${COMPONENT}_SOURCES ${SLICE} ${generated_files})
+  __astscf_ensure_abs_paths(file_list)
+  set(${COMPONENT}_SOURCES ${file_list} PARENT_SCOPE)
 endfunction()
 
 # Function which collects libraries needed by a component

commit 4f089f19b7fa0573a284b9f3efb2b0216173d27b
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 17:03:49 2011 -0500

    Ensure absolute paths are used in various places.
    
    * Make __astscf_ensure_abs_paths() use REALPATH instead of ABSOLUTE, so that
      paths which contain symlinks (including '..') are resolved to the simplest
      possible path.
    * Use __astscf_ensure_abs_paths() in astscf_component_add_file() to ensure
      that source file paths are stored in absolute form.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c1c1f3e..190be3e 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -398,7 +398,7 @@ endfunction()
 macro(__astscf_ensure_abs_paths pathlist)
   unset(eap_temp)
   foreach(p ${${pathlist}})
-    get_filename_component(newpath "${p}" ABSOLUTE)
+    get_filename_component(newpath "${p}" REALPATH)
     list(APPEND eap_temp "${newpath}")
   endforeach()
   list(REMOVE_DUPLICATES eap_temp)
@@ -409,11 +409,10 @@ endmacro()
 # Slice files in the current directory and below
 function(astscf_slice_include_directories)
   set(paths ${ARGN})
-  __astscf_ensure_abs_paths(paths)
   if(SLICE_INCLUDE_DIRECTORIES)
     list(INSERT paths 0 ${SLICE_INCLUDE_DIRECTORIES})
   endif()
-  list(REMOVE_DUPLICATES paths)
+  __astscf_ensure_abs_paths(paths)
   set(SLICE_INCLUDE_DIRECTORIES ${paths} PARENT_SCOPE)
 endfunction()
 
@@ -470,10 +469,8 @@ function(astscf_component_add_file COMPONENT)
   endif()
   message(STATUS "Adding ${ARGN} to component ${COMPONENT}")
   set(file_list ${${COMPONENT}_SOURCES})
-  foreach(file ${ARGN})
-    list(APPEND file_list ${CMAKE_CURRENT_SOURCE_DIR}/${file})
-  endforeach()
-  list(REMOVE_DUPLICATES file_list)
+  list(APPEND file_list ${ARGN})
+  __astscf_ensure_abs_paths(file_list)
   __astscf_set_cache_string(${COMPONENT}_SOURCES "${file_list}" "" ADVANCED)
 endfunction()
 

commit 5c7f0cd66c091081d5d6df863ac4a0a54ee9f3dd
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 16:27:51 2011 -0500

    Store all details for components in the cache.
    
    Variables that hold the lists of component sources, libraries and other
    details are now stored in the cache, instead of being directory-scoped. This
    will allow these to be updated in subdirectories, before the component is
    finally built.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0f2aa7f..c1c1f3e 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -457,7 +457,7 @@ function(astscf_component_add_boost_libraries COMPONENT)
     list(APPEND libs ${libtag})
   endforeach()
   list(REMOVE_DUPLICATES libs)
-  set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_BOOST_LIBRARIES "${libs}" "" ADVANCED)
 endfunction()
 
 # Function which adds source or header files to a component to be built
@@ -474,7 +474,7 @@ function(astscf_component_add_file COMPONENT)
     list(APPEND file_list ${CMAKE_CURRENT_SOURCE_DIR}/${file})
   endforeach()
   list(REMOVE_DUPLICATES file_list)
-  set(${COMPONENT}_SOURCES ${file_list} PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_SOURCES "${file_list}" "" ADVANCED)
 endfunction()
 
 # Function which remembers Ice libraries needed by a component
@@ -492,7 +492,7 @@ function(astscf_component_add_ice_libraries COMPONENT)
     list(APPEND libs ${lib})
   endforeach()
   list(REMOVE_DUPLICATES libs)
-  set(${COMPONENT}_ICE_LIBRARIES ${libs} PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_ICE_LIBRARIES "${libs}" "" ADVANCED)
 endfunction()
 
 # Adds Slice files to a target.  This handles all the magic of creating the
@@ -534,7 +534,7 @@ function(astscf_component_add_slice COMPONENT)
       endforeach()
     endif()
   endforeach()
-  set(${COMPONENT}_SOURCES ${${COMPONENT}_SOURCES} PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_SOURCES "${${COMPONENT}_SOURCES}" "" ADVANCED)
 endfunction()
 
 function(__astscf_component_add_one_slice COMPONENT SLICE)
@@ -696,7 +696,7 @@ function(astscf_component_build_icebox COMPONENT)
     message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
   endif()
   message(STATUS "Building component ${COMPONENT} as an IceBox service")
-  set(${COMPONENT}_TYPE icebox PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_TYPE icebox "" ADVANCED)
   find_package(Ice REQUIRED IceBox)
   list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
   __astscf_component_libraries(${COMPONENT})
@@ -713,7 +713,7 @@ function(astscf_component_build_standalone COMPONENT)
     message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
   endif()
   message(STATUS "Building component ${COMPONENT} as a standalone executable")
-  set(${COMPONENT}_TYPE standalone PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_TYPE standalone "" ADVANCED)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component
@@ -731,7 +731,7 @@ function(astscf_component_build_library COMPONENT)
     message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
   endif()
   message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
-  set(${COMPONENT}_TYPE library PARENT_SCOPE)
+  __astscf_set_cache_string(${COMPONENT}_TYPE library "" ADVANCED)
   __astscf_component_libraries(${COMPONENT})
 
   # Now we actually create the component

commit 5bdb40a05b6e7d080d507d81e17edd25bfa1b8ce
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 16:20:41 2011 -0500

    More script cleanups.
    
    * Set system-wide Boost include directory and library directories in
      astscf_project() instead of each time a Boost library is added to a component.
    * Remove astscf_slice_add_libraries(), as it was not being used.
    * Converted ASTSCF_${COMPONENT} variable, which indicates that a component
      has been initialized with astscf_component_init(), into a cache variable. This
      is the first step towards allowing components to include sources from multiple
      directories (all children of the directory the component will actually be
      built in).
    * Eliminated __astscf_find_boost_library() function since it was only used
      in one location.
    * Made all functions that add items to a component ensure that the component
      has been initialized.
    * Made __astscf_component_add_one_slice() an internal function.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 67b78f6..0f2aa7f 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -19,7 +19,7 @@
 #
 # Environment variables (in addition to the normal CMake variables):
 # * BOOST_ROOT - The preferred installation prefix for searching for
-#                Boost.  Set this if the module has problems finding
+#                Boost. Set this if the module has problems finding
 #                the proper Boost installation.
 # * BOOST_INCLUDEDIR - Set this to the include directory of Boost, if the
 #                        module has problems finding the proper Boost
@@ -27,7 +27,7 @@
 # * BOOST_LIBRARYDIR - Set this to the lib directory of Boost, if the
 #                        module has problems finding the proper Boost
 #                        installation
-# * ICE_HOME - The preferred installation prefix for searching for Ice.  Set
+# * ICE_HOME - The preferred installation prefix for searching for Ice. Set
 #              this if the  module has problems finding the proper Ice
 #              installation
 #
@@ -380,54 +380,20 @@ function(astscf_project NAME ICE_VERSION)
 
   # Boost is required
   # Only specify those versions that are not "known" by default for
-  # the oldest version of cmake supported.
+  # the oldest version of CMake supported.
   # 
   set(Boost_ADDITIONAL_VERSIONS "1.44" "1.44.0" "1.45" "1.45.0" "1.46" "1.46.0" "1.46.1")
   find_package(Boost ${MIN_BOOST_VERSION} REQUIRED)
   set(Boost_CORE_FOUND "bazinga" PARENT_SCOPE)
   set(Boost_CORE_FOUND "bazinga")
+  include_directories(SYSTEM ${Boost_INCLUDE_DIR})
+  link_directories(${Boost_LIBRARY_DIRS})
 
   __astscf_compute_test_paths()
 
   message(STATUS "Passed requirement checks for CXX components")
 endfunction()
 
-# Function which initializes a component for building
-function(astscf_component_init COMPONENT)
-  message(STATUS "Setting up to build component ${COMPONENT}")
-  set(ASTSCF_${COMPONENT} Bob PARENT_SCOPE)
-endfunction()
-
-# Find a Boost library.
-function(__astscf_find_boost_library LIBRARY)
-  string(TOUPPER ${LIBRARY} libtag)
-  if(NOT Boost_${libtag}_FOUND)
-    find_package(Boost REQUIRED ${LIBRARY})
-  endif()
-  if(NOT Boost_${libtag}_FOUND)
-    message(FATAL_ERROR "Boost library ${LIBRARY} not found")
-  endif()
-endfunction()
-
-# Function which adds Boost libraries needed by a component
-function(astscf_component_add_boost_libraries COMPONENT)
-  if(NOT ARGN)
-    message(FATAL_ERROR "You must pass at least one library to this function")
-  endif()
-  set(libs ${${COMPONENT}_BOOST_LIBRARIES})
-  # By default we are disabling boost auto-linking and specifying dynamic linking.
-  add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK)
-  foreach(lib ${ARGN})
-    __astscf_find_boost_library(${lib})
-    string(TOUPPER "${lib}" lib)
-    list(APPEND libs ${lib})
-  endforeach()
-  list(REMOVE_DUPLICATES libs)
-  set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
-  include_directories(SYSTEM ${Boost_INCLUDE_DIR})
-  link_directories(${Boost_LIBRARY_DIRS})
-endfunction()
-
 # Ensures that a list of paths are all absolute paths.
 macro(__astscf_ensure_abs_paths pathlist)
   unset(eap_temp)
@@ -439,7 +405,8 @@ macro(__astscf_ensure_abs_paths pathlist)
   set(${pathlist} ${eap_temp})
 endmacro()
 
-# Function which remembers include directories needed for a particular Slice target
+# Function which remembers include directories needed for translating
+# Slice files in the current directory and below
 function(astscf_slice_include_directories)
   set(paths ${ARGN})
   __astscf_ensure_abs_paths(paths)
@@ -464,19 +431,33 @@ function(astscf_slice_plugins)
   set(SLICE_PLUGINS ${plugins} PARENT_SCOPE)
 endfunction()
 
-# Function which remembers Ice libraries needed by a Slice target
-function(astscf_slice_add_ice_libraries TARGET)
+# Function which initializes a component for building
+function(astscf_component_init COMPONENT)
+  message(STATUS "Setting up to build component ${COMPONENT}")
+  __astscf_set_cache_string(ASTSCF_${COMPONENT} Bob "" ADVANCED)
+endfunction()
+
+# Function which adds Boost libraries needed by a component
+function(astscf_component_add_boost_libraries COMPONENT)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one library to this function")
   endif()
-  set(libs ${${TARGET}_ICE_LIBRARIES})
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
+  set(libs ${${COMPONENT}_BOOST_LIBRARIES})
+  # By default we are disabling boost auto-linking and specifying dynamic linking.
+  add_definitions(-DBOOST_ALL_NO_LIB -DBOOST_ALL_DYN_LINK)
   foreach(lib ${ARGN})
-    find_package(Ice REQUIRED ${lib})
-    string(TOUPPER "${lib}" lib)
-    list(APPEND libs ${lib})
+    string(TOUPPER ${lib} libtag)
+    find_package(Boost REQUIRED ${lib})
+    if(NOT Boost_${libtag}_FOUND)
+      message(FATAL_ERROR "Boost library ${lib} not found")
+    endif()
+    list(APPEND libs ${libtag})
   endforeach()
   list(REMOVE_DUPLICATES libs)
-  set(${TARGET}_ICE_LIBRARIES ${libs} PARENT_SCOPE)
+  set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
 endfunction()
 
 # Function which adds source or header files to a component to be built
@@ -484,6 +465,9 @@ function(astscf_component_add_file COMPONENT)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one source file to this function")
   endif()
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   message(STATUS "Adding ${ARGN} to component ${COMPONENT}")
   set(file_list ${${COMPONENT}_SOURCES})
   foreach(file ${ARGN})
@@ -498,6 +482,9 @@ function(astscf_component_add_ice_libraries COMPONENT)
   if(NOT ARGN)
     message(FATAL_ERROR "You must pass at least one library to this function")
   endif()
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   set(libs ${${COMPONENT}_ICE_LIBRARIES})
   foreach(lib ${ARGN})
     find_package(Ice REQUIRED ${lib})
@@ -524,6 +511,12 @@ endfunction()
 # See http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:file for more
 # details on the globbing syntax.
 function(astscf_component_add_slice COMPONENT)
+  if(NOT ARGN)
+    message(FATAL_ERROR "You must pass at least one Slice file to this function")
+  endif()
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   # default to glob syntax by default.  not as useful as GLOB_RECURSE, but
   # follows the principle of least surprise
   set(glob_style GLOB)
@@ -537,14 +530,14 @@ function(astscf_component_add_slice COMPONENT)
         ${slice_glob})
 
       foreach(slice ${slices})
-        astscf_component_add_one_slice(${COMPONENT} ${slice})
+        __astscf_component_add_one_slice(${COMPONENT} ${slice})
       endforeach()
     endif()
   endforeach()
   set(${COMPONENT}_SOURCES ${${COMPONENT}_SOURCES} PARENT_SCOPE)
 endfunction()
 
-function(astscf_component_add_one_slice COMPONENT SLICE)
+function(__astscf_component_add_one_slice COMPONENT SLICE)
   if(NOT SLICE_COMPILER)
     # Find the actual Slice compiler
     find_program(SLICE_COMPILER slice2cpp PATHS "${ICE_DIR}/bin"
@@ -699,6 +692,9 @@ endfunction()
 
 # Function which builds a component as an IceBox service
 function(astscf_component_build_icebox COMPONENT)
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   message(STATUS "Building component ${COMPONENT} as an IceBox service")
   set(${COMPONENT}_TYPE icebox PARENT_SCOPE)
   find_package(Ice REQUIRED IceBox)
@@ -713,6 +709,9 @@ endfunction()
 
 # Function which builds a component standalone
 function(astscf_component_build_standalone COMPONENT)
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   message(STATUS "Building component ${COMPONENT} as a standalone executable")
   set(${COMPONENT}_TYPE standalone PARENT_SCOPE)
   __astscf_component_libraries(${COMPONENT})
@@ -728,6 +727,9 @@ function(astscf_set_libtype COMPONENT TYPE)
 endfunction()
 
 function(astscf_component_build_library COMPONENT)
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
   set(${COMPONENT}_TYPE library PARENT_SCOPE)
   __astscf_component_libraries(${COMPONENT})
@@ -740,6 +742,9 @@ endfunction()
 
 # Install the given component to their proper location
 function(astscf_component_install COMPONENT)
+  if(NOT ASTSCF_${COMPONENT})
+    message(FATAL_ERROR "Component ${COMPONENT} has not been initialized.")
+  endif()
   if(${COMPONENT}_TYPE STREQUAL "icebox")
     install(
       TARGETS ${COMPONENT}

commit 070b81a3427d1981dfcfbe472aed1e255e7c38df
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 15:47:53 2011 -0500

    Format various install functions consistently.
    
    Also ensure that only header files are installed by astscf_headers_install().

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 0141500..67b78f6 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -741,35 +741,47 @@ endfunction()
 # Install the given component to their proper location
 function(astscf_component_install COMPONENT)
   if(${COMPONENT}_TYPE STREQUAL "icebox")
-    install(TARGETS ${COMPONENT}
+    install(
+      TARGETS ${COMPONENT}
       ARCHIVE DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
       LIBRARY DESTINATION ${ASTSCF_INSTALL_ICEBOX_DIR}
-      RUNTIME DESTINATION ${ASTSCF_INSTALL_ICEBOX_DIR})
+      RUNTIME DESTINATION ${ASTSCF_INSTALL_ICEBOX_DIR}
+      )
   else()
-    install(TARGETS ${COMPONENT}
+    install(
+      TARGETS ${COMPONENT}
       ARCHIVE DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
       LIBRARY DESTINATION ${ASTSCF_INSTALL_LIB_DIR}
-      RUNTIME DESTINATION ${ASTSCF_INSTALL_BIN_DIR})
+      RUNTIME DESTINATION ${ASTSCF_INSTALL_BIN_DIR}
+      )
   endif()
 endfunction()
 
 # Install generated Slice header files to their proper location
 function(astscf_slice_headers_install)
-  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/
+  install(
+    DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/
     DESTINATION ${ASTSCF_INSTALL_INCLUDE_DIR}
-    FILES_MATCHING PATTERN "*.h")
+    FILES_MATCHING PATTERN "*.h"
+    )
 endfunction()
 
 # Install Slice files to their proper location
 function(astscf_slice_install DIR)
-  install(DIRECTORY ${DIR}
+  install(
+    DIRECTORY ${DIR}
     DESTINATION ${ASTSCF_INSTALL_SLICE_DIR}
-    FILES_MATCHING PATTERN "*.ice")
+    FILES_MATCHING PATTERN "*.ice"
+    )
 endfunction()
 
 # Install header files to their proper location
 function(astscf_headers_install DIR)
-  install(DIRECTORY ${DIR} DESTINATION ${ASTSCF_INSTALL_INCLUDE_DIR})
+  install(
+    DIRECTORY ${DIR}
+    DESTINATION ${ASTSCF_INSTALL_INCLUDE_DIR}
+    FILES_MATCHING PATTERN "*.h"
+    )
 endfunction()
 
 # Adds a component to the packager. COMPONENTNAME must have been previously defined

commit cf1d59636fb93f04b71c4a6d73ac17eadb276b63
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 15:38:15 2011 -0500

    Make cache-setting functions able to mark variables as ADVANCED.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index e399afb..0141500 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -78,14 +78,29 @@ message(STATUS "Installation prefix set to ${CMAKE_INSTALL_PREFIX}")
 
 function(__astscf_set_cache_path var value reason)
   set("${var}" "${value}" CACHE PATH "${reason}" FORCE)
+  foreach(item ${ARGN})
+    if(item STREQUAL ADVANCED)
+      mark_as_advanced("${var}")
+    endif()
+  endforeach()
 endfunction()
 
 function(__astscf_set_cache_filepath var value reason)
   set("${var}" "${value}" CACHE FILEPATH "${reason}" FORCE)
+  foreach(item ${ARGN})
+    if(item STREQUAL ADVANCED)
+      mark_as_advanced("${var}")
+    endif()
+  endforeach()
 endfunction()
 
 function(__astscf_set_cache_string var value reason)
   set("${var}" "${value}" CACHE STRING "${reason}" FORCE)
+  foreach(item ${ARGN})
+    if(item STREQUAL ADVANCED)
+      mark_as_advanced("${var}")
+    endif()
+  endforeach()
 endfunction()
 
 macro(__astscf_append_to_var VAR)
@@ -105,24 +120,14 @@ __astscf_set_cache_path(INSTALL_DATA_DIR ${INSTALL_DATA_ROOT_DIR} "idiosyncratic
 __astscf_set_cache_path(INSTALL_INCLUDE_DIR include "directory for installing header files")
 __astscf_set_cache_path(INSTALL_LOCAL_STATE_DIR var "data files which the programs modify while they run, and that pertain to one specific machine")
 
-__astscf_set_cache_path(ASTSCF_INSTALL_CONF_DIR ${INSTALL_SYS_CONF_DIR}/asterisk-scf "Asterisk SCF files")
-__astscf_set_cache_path(ASTSCF_INSTALL_BIN_DIR ${INSTALL_BIN_DIR} "Asterisk SCF executable programs")
-__astscf_set_cache_path(ASTSCF_INSTALL_LIB_DIR ${INSTALL_LIB_DIR} "Asterisk SCF libraries")
-__astscf_set_cache_path(ASTSCF_INSTALL_ICEBOX_DIR ${INSTALL_LIB_DIR}/asterisk-scf/icebox "Asterisk SCF IceBox modules")
-__astscf_set_cache_path(ASTSCF_INSTALL_LOCAL_STATE_DIR ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf "Asterisk SCF local state files")
-__astscf_set_cache_path(ASTSCF_INSTALL_LOG_FILE ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log "Asterisk SCF logfile")
-__astscf_set_cache_path(ASTSCF_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR} "Directory for installed Asterisk SCF API C++ header files")
-__astscf_set_cache_path(ASTSCF_INSTALL_SLICE_DIR ${INSTALL_DATA_DIR}/asterisk-scf/slice "Directory for installed Asterisk SCF API Slice files")
-
-mark_as_advanced(
-  ASTSCF_INSTALL_CONF_DIR
-  ASTSCF_INSTALL_BIN_DIR
-  ASTSCF_INSTALL_LIB_DIR
-  ASTSCF_INSTALL_ICEBOX_DIR
-  ASTSCF_INSTALL_LOCAL_STATE_DIR
-  ASTSCF_INSTALL_LOG_FILE
-  ASTSCF_INSTALL_INCLUDE_DIR
-  ASTSCF_INSTALL_SLICE_DIR)
+__astscf_set_cache_path(ASTSCF_INSTALL_CONF_DIR ${INSTALL_SYS_CONF_DIR}/asterisk-scf "Asterisk SCF files" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_BIN_DIR ${INSTALL_BIN_DIR} "Asterisk SCF executable programs" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_LIB_DIR ${INSTALL_LIB_DIR} "Asterisk SCF libraries" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_ICEBOX_DIR ${INSTALL_LIB_DIR}/asterisk-scf/icebox "Asterisk SCF IceBox modules" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_LOCAL_STATE_DIR ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf "Asterisk SCF local state files" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_LOG_FILE ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log "Asterisk SCF logfile" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR} "Directory for installed Asterisk SCF API C++ header files" ADVANCED)
+__astscf_set_cache_path(ASTSCF_INSTALL_SLICE_DIR ${INSTALL_DATA_DIR}/asterisk-scf/slice "Directory for installed Asterisk SCF API Slice files" ADVANCED)
 
 # If a build type has not been explicitly specified then use debug
 if(NOT CMAKE_BUILD_TYPE)

commit eee6ecfce5cda37eaf4d890ee460a708211e3cb0
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 14:36:15 2011 -0500

    Rename ASTSCF_ICEBOX_EXPORT to ASTSCF_DLL_EXPORT.
    
    This symbol is not used only for components that are loaded as IceBox services;
    it is also needed when shared libraries are built to be used by other components,
    so its name should not be IceBox-specific.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index a441358..e399afb 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -275,13 +275,13 @@ function(astscf_project NAME ICE_VERSION)
 
   set(CMAKE_INCLUDE_CURRENT_DIR true)
 
-  # On Windows, IceBox C++ services must be compiled with some symbols exported;
-  # the source code should use ASTSCF_ICEBOX_EXPORT to accomplish this, and this
+  # On Windows, IceBox C++ services and some other types of libraries  must be compiled
+  # with some symbols exported; the source code should use ASTSCF_DLL_EXPORT to accomplish this
   if(WIN32)
-    message(STATUS "Setting ASTSCF_ICEBOX_EXPORT definition for Windows IceBox services")
-    add_definitions(-DASTSCF_ICEBOX_EXPORT=__declspec\(dllexport\))
+    message(STATUS "Setting ASTSCF_DLL_EXPORT definition for Windows libraries")
+    add_definitions(-DASTSCF_DLL_EXPORT=__declspec\(dllexport\))
   else()
-    add_definitions(-DASTSCF_ICEBOX_EXPORT=)
+    add_definitions(-DASTSCF_DLL_EXPORT=)
   endif()
 
   # On Windows, 'debug' libraries should have a "d" suffix to indicate that they
@@ -659,7 +659,7 @@ function(astscf_component_add_one_slice COMPONENT SLICE)
   # the generated classes to be exported from the library (only necessary on
   # Windows)
   if(WIN32)
-    list(APPEND slice_compiler_arguments "--dll-export" "ASTSCF_ICEBOX_EXPORT")
+    list(APPEND slice_compiler_arguments "--dll-export" "ASTSCF_DLL_EXPORT")
   endif()
 
   file(MAKE_DIRECTORY ${slice_out_dir})

commit 697a42409dccb3e5860275919f8866a44e6b902a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Jun 3 14:30:30 2011 -0500

    Consistency cleanups:
    
    * Remove unused functions/macros.
    * Add "__astscf" prefix to all functions/macros that are intended for internal
      use in the script (preparation for converting this script to a FindPackage-
      type script).
    * Copy over various functions to set cache variables from FindIce.cmake and use
... 1998 lines suppressed ...


-- 
asterisk-scf/integration/cmake.git



More information about the asterisk-scf-commits mailing list