[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 09:18:46 CST 2011


branch "master" has been updated
       via  ef6b7876cdaba286e76adc99a1088375b58f7686 (commit)
       via  84fdbeadea2fa938a77241c65ab4b3b799136b1e (commit)
       via  b13c01c4f586c2b82c368c9d085adcb44715bc51 (commit)
      from  a7e7b7d2e766af7d7a437441cfabfa9fe8b394d1 (commit)

Summary of changes:
 AsteriskSCF.cmake |   54 +++++++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 26 deletions(-)


- Log -----------------------------------------------------------------
commit ef6b7876cdaba286e76adc99a1088375b58f7686
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jan 20 08:47:02 2011 -0600

    Ensure that system and generated includes are marked SYSTEM

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 48bf5e9..acf6ad3 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -298,7 +298,7 @@ function(asterisk_scf_add_boost_libraries)
     endforeach()
     list(REMOVE_DUPLICATES libs)
     set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
-    include_directories(${Boost_INCLUDE_DIR})
+    include_directories(SYSTEM ${Boost_INCLUDE_DIR})
     link_directories(${Boost_LIBRARY_DIRS})
 endfunction()
 
@@ -317,7 +317,7 @@ function(asterisk_scf_component_add_boost_libraries COMPONENT)
     endforeach()
     list(REMOVE_DUPLICATES libs)
     set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
-    include_directories(${Boost_INCLUDE_DIR})
+    include_directories(SYSTEM ${Boost_INCLUDE_DIR})
     link_directories(${Boost_LIBRARY_DIRS})
 endfunction()
 
@@ -501,10 +501,11 @@ function(asterisk_scf_component_add_one_slice COMPONENT SLICE)
     endif()
     get_filename_component(slice_basename "${SLICE}" NAME_WE)
     # headers are generated, so add them to the include path
-    include_directories("${CMAKE_CURRENT_BINARY_DIR}/generated")
+    # 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("${slice_out_dir}")
+    include_directories(SYSTEM "${slice_out_dir}")
 
     # fully specify SLICE's path
     set(SLICE "${CMAKE_CURRENT_SOURCE_DIR}/${SLICE}")

commit 84fdbeadea2fa938a77241c65ab4b3b799136b1e
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 17 14:11:26 2011 -0600

    INSTALL variables are PATH, not FILEPATH.

diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index c3e16e8..48bf5e9 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -60,45 +60,45 @@ endif()
 message(STATUS "Installation prefix set to ${CMAKE_INSTALL_PREFIX}")
 
 # installation directories (these are all relative to ${CMAKE_INSTALL_PREFIX})
-set(INSTALL_SYS_CONF_DIR etc CACHE FILEPATH
+set(INSTALL_SYS_CONF_DIR etc CACHE PATH
     "read-only data files that pertain to a single machine")
-set(INSTALL_BIN_DIR bin CACHE FILEPATH
+set(INSTALL_BIN_DIR bin CACHE PATH
     "executable programs that users can run")
-set(INSTALL_LIB_DIR lib CACHE FILEPATH
+set(INSTALL_LIB_DIR lib CACHE PATH
     "object files and libraries of object code")
-set(INSTALL_DATA_ROOT_DIR share CACHE FILEPATH
+set(INSTALL_DATA_ROOT_DIR share CACHE PATH
     "read-only architecture-independent data files")
-set(INSTALL_DATA_DIR ${INSTALL_DATA_ROOT_DIR} CACHE FILEPATH
+set(INSTALL_DATA_DIR ${INSTALL_DATA_ROOT_DIR} CACHE PATH
     "idiosyncratic read-only architecture-independent data files for this program")
-set(INSTALL_INCLUDE_DIR include CACHE FILEPATH
+set(INSTALL_INCLUDE_DIR include CACHE PATH
     "directory for installing header files")
-set(INSTALL_LOCAL_STATE_DIR var CACHE FILEPATH
+set(INSTALL_LOCAL_STATE_DIR var CACHE PATH
     "data files which the programs modify while they run, and that pertain to one specific machine")
 
 set(ASTERISK_SCF_INSTALL_CONF_DIR
-    ${INSTALL_SYS_CONF_DIR}/asterisk-scf CACHE FILEPATH
+    ${INSTALL_SYS_CONF_DIR}/asterisk-scf CACHE PATH
     "Asterisk SCF files")
 set(ASTERISK_SCF_INSTALL_BIN_DIR
-    ${INSTALL_BIN_DIR} CACHE FILEPATH
+    ${INSTALL_BIN_DIR} CACHE PATH
     "Asterisk SCF executable programs")
 set(ASTERISK_SCF_INSTALL_LIB_DIR
-    ${INSTALL_LIB_DIR} CACHE FILEPATH
+    ${INSTALL_LIB_DIR} CACHE PATH
     "Asterisk SCF libraries")
 set(ASTERISK_SCF_INSTALL_ICEBOX_DIR
     ${INSTALL_LIB_DIR}/asterisk-scf/icebox
-    CACHE FILEPATH
+    CACHE PATH
     "Asterisk SCF IceBox modules")
 set(ASTERISK_SCF_INSTALL_LOCAL_STATE_DIR
-    ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf CACHE FILEPATH
+    ${INSTALL_LOCAL_STATE_DIR}/lib/asterisk-scf CACHE PATH
     "Asterisk SCF local state files")
 set(ASTERISK_SCF_INSTALL_LOG_FILE
-    ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log CACHE FILEPATH
+    ${INSTALL_LOCAL_STATE_DIR}/log/asterisk-scf.log CACHE PATH
     "Asterisk SCF logfile")
 set(ASTERISK_SCF_INSTALL_INCLUDE_DIR
-    ${INSTALL_INCLUDE_DIR} CACHE FILEPATH
+    ${INSTALL_INCLUDE_DIR} CACHE PATH
     "Directory for installed Asterisk SCF API C++ header files")
 set(ASTERISK_SCF_INSTALL_SLICE_DIR
-    ${INSTALL_DATA_DIR}/asterisk-scf/slice CACHE FILEPATH
+    ${INSTALL_DATA_DIR}/asterisk-scf/slice CACHE PATH
     "Directory for installed Asterisk SCF API Slice files")
 
 mark_as_advanced(

commit b13c01c4f586c2b82c368c9d085adcb44715bc51
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 f980a89..c3e16e8 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -597,11 +597,8 @@ function(asterisk_scf_component_build_icebox COMPONENT)
     list(APPEND icelibs ${${COMPONENT}_ICE_LIBRARIES} ICEBOX)
     asterisk_scf_component_libraries(${COMPONENT})
 
-    # 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
     target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()
@@ -617,12 +614,16 @@ function(asterisk_scf_component_build_standalone COMPONENT)
     target_link_libraries(${COMPONENT} ${component_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")
     asterisk_scf_component_libraries(${COMPONENT})
 
     # Now we actually create the component
-    add_library(${COMPONENT} ${${COMPONENT}_SOURCES})
+    add_library(${COMPONENT} ${${COMPONENT}_LIBTYPE} ${${COMPONENT}_SOURCES})
     # Link required libraries
     target_link_libraries(${COMPONENT} ${component_libs})
 endfunction()

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


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list