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

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


branch "install" has been updated
       via  a85e1f984812cb78fcb8a12c5d8857f229742bbd (commit)
      from  b4fd8d09b52eee7c0cc552b3612b3b4e41a3c3b6 (commit)

Summary of changes:
 server/src/CMakeLists.txt  |   34 ++++++++++++++++++++++------------
 server/test/CMakeLists.txt |    2 +-
 2 files changed, 23 insertions(+), 13 deletions(-)


- Log -----------------------------------------------------------------
commit a85e1f984812cb78fcb8a12c5d8857f229742bbd
Author: David M. Lee <dlee at digium.com>
Date:   Fri Jan 14 12:59:07 2011 -0600

    Fixed problems caused by linking icebox modules as modules.
    
    On systems where it makes a difference (i.e. Mac OS X), modules cannot
    be used as shared libraries.  Unfortunately, we were loading the logging
    server icebox component as a shared lib in the unit tests.  This patch
    creates a static library which has the bulk of the logic, which is used
    by both the unit tests and the icebox module.

diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 741a2cb..0b33e92 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -6,27 +6,37 @@
 # All rights reserved.
 #
 
-asterisk_scf_component_init(logging-service CXX)
+asterisk_scf_component_init(logging-service-lib CXX)
+
+# an icebox module cannot be used as a shared lib.  so build the bulk of the
+# code as a static lib that can be linked into both the icebox module and
+# the unit tests
+asterisk_scf_set_libtype(logging-service-lib STATIC)
 
 include_directories(../../include)
 
-asterisk_scf_component_add_file(logging-service ChainedLogOut.cpp)
-asterisk_scf_component_add_file(logging-service FileChainedLogOut.cpp)
-asterisk_scf_component_add_file(logging-service LoggingServer.cpp)
-asterisk_scf_component_add_file(logging-service OstreamChainedLogOut.cpp)
-asterisk_scf_component_add_file(logging-service main.cpp)
+asterisk_scf_component_add_file(logging-service-lib ChainedLogOut.cpp)
+asterisk_scf_component_add_file(logging-service-lib FileChainedLogOut.cpp)
+asterisk_scf_component_add_file(logging-service-lib LoggingServer.cpp)
+asterisk_scf_component_add_file(logging-service-lib OstreamChainedLogOut.cpp)
 
-asterisk_scf_component_add_file(logging-service ChainedLogOut.h)
-asterisk_scf_component_add_file(logging-service FileChainedLogOut.h)
-asterisk_scf_component_add_file(logging-service OstreamChainedLogOut.h)
-asterisk_scf_component_add_file(logging-service LoggingServer.h)
+asterisk_scf_component_add_file(logging-service-lib ChainedLogOut.h)
+asterisk_scf_component_add_file(logging-service-lib FileChainedLogOut.h)
+asterisk_scf_component_add_file(logging-service-lib OstreamChainedLogOut.h)
+asterisk_scf_component_add_file(logging-service-lib LoggingServer.h)
 
 asterisk_scf_add_ice_libraries(IceStorm)
-asterisk_scf_component_add_boost_libraries(logging-service core)
+asterisk_scf_component_add_boost_libraries(logging-service-lib core)
 
 include_directories(${API_INCLUDE_DIR})
+asterisk_scf_component_build_library(logging-service-lib)
+target_link_libraries(logging-service-lib asterisk-scf-api)
+
+# icebox module
+asterisk_scf_component_init(logging-service CXX)
+asterisk_scf_component_add_file(logging-service main.cpp)
 asterisk_scf_component_build_icebox(logging-service)
-target_link_libraries(logging-service asterisk-scf-api)
+target_link_libraries(logging-service logging-service-lib)
 
 install(TARGETS logging-service
     LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR}
diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt
index 86e4a80..94b4643 100644
--- a/server/test/CMakeLists.txt
+++ b/server/test/CMakeLists.txt
@@ -20,6 +20,6 @@ include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_standalone(logging-service-test)
 target_link_libraries(logging-service-test asterisk-scf-api)
 
-target_link_libraries(logging-service-test logging-service)
+target_link_libraries(logging-service-test logging-service-lib)
 
 boost_add_test(logging-service-test)

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


-- 
asterisk-scf/integration/logger.git



More information about the asterisk-scf-commits mailing list