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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jan 20 13:05:38 CST 2011


branch "master" has been updated
       via  528c1225b6cf70d78a53d1e0080ee57d8d0d23a4 (commit)
      from  39a22b6e9aa90751277527ef5ca684671d1e764c (commit)

Summary of changes:
 AsteriskSCF.cmake |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 528c1225b6cf70d78a53d1e0080ee57d8d0d23a4
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jan 20 12:33:26 2011 -0600

    Refactored out several install functions for installation.
    
    * asterisk_scf_component_install - Install a component
    * asterisk_scf_headers_install - Install .h files
    * asterisk_scf_slice_headers_install - Install generated .h files
    * asterisk_scf_slice_install - Install .ice files

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 8bb0792..02ec5ac 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -593,6 +593,7 @@ endfunction()
 # Function which builds a component as an IceBox service
 function(asterisk_scf_component_build_icebox COMPONENT)
     message(STATUS "Building component ${COMPONENT} as an IceBox service")
+    set(${COMPONENT}_TYPE icebox PARENT_SCOPE)
     find_package(Ice REQUIRED IceBox)
     list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
     asterisk_scf_component_libraries(${COMPONENT})
@@ -606,6 +607,7 @@ endfunction()
 # Function which builds a component standalone
 function(asterisk_scf_component_build_standalone COMPONENT)
     message(STATUS "Building component ${COMPONENT} as a standalone executable")
+    set(${COMPONENT}_TYPE standalone PARENT_SCOPE)
     asterisk_scf_component_libraries(${COMPONENT})
 
     # Now we actually create the component
@@ -620,6 +622,7 @@ endfunction()
 
 function(asterisk_scf_component_build_library COMPONENT)
     message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
+    set(${COMPONENT}_TYPE library PARENT_SCOPE)
     asterisk_scf_component_libraries(${COMPONENT})
 
     # Now we actually create the component
@@ -628,15 +631,38 @@ function(asterisk_scf_component_build_library COMPONENT)
     target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
 
-# Function which adds information for installing a component
-function(asterisk_scf_component_install COMPONENTNAME TYPE DIR DESC GROUP)
-    install(TARGETS ${COMPONENTNAME} ${TYPE} DESTINATION ${DIR} COMPONENT ${COMPONENTNAME} ${ARGN})
-
-    if(ASTERISKSCF_CPACK)
-        asterisk_scf_component_package(${COMPONENTNAME} ${DESC} ${GROUP})
+# Install the given component to their proper location
+function(asterisk_scf_component_install COMPONENT)
+    if(${COMPONENT}_TYPE STREQUAL "icebox")
+        install(TARGETS ${COMPONENT}
+            LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
+            RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
+    else()
+        install(TARGETS ${COMPONENT}
+            LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
+            RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_BIN_DIR})
     endif()
 endfunction()
 
+# Install generated Slice header files to their proper location
+function(asterisk_scf_slice_headers_install)
+    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/
+    DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR}
+    FILES_MATCHING PATTERN "*.h")
+endfunction()
+
+# Install Slice files to their proper location
+function(asterisk_scf_slice_install DIR)
+    install(DIRECTORY ${DIR}
+        DESTINATION ${ASTERISK_SCF_INSTALL_SLICE_DIR}
+        FILES_MATCHING PATTERN "*.ice")
+endfunction()
+
+# Install header files to their proper location
+function(asterisk_scf_headers_install DIR)
+    install(DIRECTORY ${DIR} DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})
+endfunction()
+
 # Adds a component to the packager. COMPONENTNAME must have been previously defined
 # via the install command.
 function(asterisk_scf_component_package COMPONENTNAME DESC GROUPNAME)

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


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list