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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Jan 20 09:18:44 CST 2011


branch "master" has been updated
       via  7abce953fdf0254467e6d73382d3336cbc6c497b (commit)
       via  5636b677094cd8d070ba3bf2f4652533523c497f (commit)
       via  483cdca08a0797dbbfe6bd58842ca8aafbbfcd6d (commit)
      from  81a524e77144019117947ee59664922c0dcc5d5d (commit)

Summary of changes:
 CMakeLists.txt             |    2 +-
 server/src/CMakeLists.txt  |   39 +++++++++++++++++++++++++++------------
 server/test/CMakeLists.txt |    2 +-
 3 files changed, 29 insertions(+), 14 deletions(-)


- Log -----------------------------------------------------------------
commit 7abce953fdf0254467e6d73382d3336cbc6c497b
Author: David M. Lee <dlee at digium.com>
Date:   Thu Jan 20 09:01:10 2011 -0600

    Runtime destination for regular libs should be bindir

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb89de3..8eb0313 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,5 +58,5 @@ target_link_libraries(logging-client asterisk-scf-api)
 
 install(TARGETS logging-client
     LIBRARY DESTINATION ${ASTERISK_SCF_INSTALL_LIB_DIR}
-    RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_ICEBOX_DIR})
+    RUNTIME DESTINATION ${ASTERISK_SCF_INSTALL_BIN_DIR})
 install(DIRECTORY include/ DESTINATION ${ASTERISK_SCF_INSTALL_INCLUDE_DIR})

commit 5636b677094cd8d070ba3bf2f4652533523c497f
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 17 16:14:07 2011 -0600

    Static logger lib needs to be compiled with -fPIC.

diff --git a/server/src/CMakeLists.txt b/server/src/CMakeLists.txt
index 0b33e92..2946930 100644
--- a/server/src/CMakeLists.txt
+++ b/server/src/CMakeLists.txt
@@ -32,6 +32,11 @@ include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_library(logging-service-lib)
 target_link_libraries(logging-service-lib asterisk-scf-api)
 
+# This lib is compiled into a .so, so it needs -fPIC set
+if(CMAKE_COMPILER_IS_GNUCXX)
+    set_target_properties(logging-service-lib PROPERTIES COMPILE_FLAGS -fPIC)
+endif()
+
 # icebox module
 asterisk_scf_component_init(logging-service CXX)
 asterisk_scf_component_add_file(logging-service main.cpp)

commit 483cdca08a0797dbbfe6bd58842ca8aafbbfcd6d
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/release/logger.git



More information about the asterisk-scf-commits mailing list