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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jan 14 13:19:59 CST 2011


branch "install" has been updated
       via  4a0264a4d66dae9a83f08361f424a5612997db90 (commit)
      from  0e015db028ac1d9f72e9e8c54331a22a2bc99f38 (commit)

Summary of changes:
 AsteriskSCF.cmake |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 4a0264a4d66dae9a83f08361f424a5612997db90
Author: David M. Lee <dlee at digium.com>
Date:   Fri Jan 14 13:01:54 2011 -0600

    Fixed some library linkage nitpicks.
    
    * Build icebox modules as modules instead of shared libraries.  Ice has
      been patched to address the original issue that caused us to switch to
      shared libs in the first place.
    * Add capability to specify the library type (SHARED or STATIC) for an
      individual library.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 06d201b..f4de8e0 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -634,11 +634,8 @@ function(asterisk_scf_component_build_icebox COMPONENT)
         endif()
     endforeach()
 
-    # Now we actually create the library
-    # while one would think that MODULE would be the right setting, it
-    # has to be shared due to how icebox finds these libraries on a Mac
-    # (it loads .dylib instead of loading .so)
-    add_library(${COMPONENT} SHARED ${${COMPONENT}_SOURCES})
+    # Now we actually create the shared module
+    add_library(${COMPONENT} MODULE ${${COMPONENT}_SOURCES})
     # Link required libraries and Slice libraries
     list(APPEND boostlibs ${ASTERISK_SCF_BOOST_LIBRARIES} ${${COMPONENT}_BOOST_LIBRARIES})
     if(boostlibs)
@@ -692,8 +689,12 @@ function(asterisk_scf_component_build_standalone COMPONENT)
     target_link_libraries(${COMPONENT} ${${COMPONENT}_SLICES} ${target_libs})
 endfunction()
 
+function(asterisk_scf_set_libtype COMPONENT TYPE)
+    set("${COMPONENT}_LIBTYPE" ${TYPE} PARENT_SCOPE)
+endfunction()
+
 function(asterisk_scf_component_build_library COMPONENT)
-    message(STATUS "Building component ${COMPONENT} as a library")
+    message(STATUS "Building component ${COMPONENT} as a ${${COMPONENT}_LIBTYPE} library")
     list(APPEND icelibs ${ASTERISK_SCF_ICE_LIBRARIES} ${${COMPONENT}_ICE_LIBRARIES})
     list(LENGTH icelibs numicelibs)
     if(numicelibs GREATER 0)
@@ -708,7 +709,7 @@ function(asterisk_scf_component_build_library COMPONENT)
     endforeach()
 
     # Now we actually create the component
-    add_library(${COMPONENT} ${${COMPONENT}_SOURCES})
+    add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
     # Link required libraries and Slice libraries
     list(APPEND boostlibs ${ASTERISK_SCF_BOOST_LIBRARIES} ${${COMPONENT}_BOOST_LIBRARIES})
     if(boostlibs)

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


-- 
asterisk-scf/integration/cmake.git



More information about the asterisk-scf-commits mailing list