[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
Tue Sep 14 12:48:57 CDT 2010
branch "master" has been updated
via 22dfc54c50affccc06f25b6391b0bbd71f7da568 (commit)
from f3690c333fcda3c09f0ce3fbb71db33d3712e899 (commit)
Summary of changes:
Hydra_v4.cmake | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 22dfc54c50affccc06f25b6391b0bbd71f7da568
Author: Brent Eagles <beagles at digium.com>
Date: Tue Sep 14 12:24:34 2010 -0230
Add a shared library rule.
diff --git a/Hydra_v4.cmake b/Hydra_v4.cmake
index d14d2f1..fd1df87 100755
--- a/Hydra_v4.cmake
+++ b/Hydra_v4.cmake
@@ -758,6 +758,33 @@ function(hydra_component_build_standalone COMPONENT)
endif()
endfunction()
+function(hydra_component_build_library COMPONENT)
+ set(lang ${HYDRA_${COMPONENT}_LANG})
+ message(STATUS "Building component ${COMPONENT} (${lang}) as standalone executable")
+ list(APPEND icelibs ${HYDRA_ICE_LIBRARIES_${lang}} ${${COMPONENT}_ICE_LIBRARIES})
+ list(REMOVE_DUPLICATES icelibs)
+ foreach(lib ${icelibs})
+ list(APPEND target_libs "${ICE_${lang}_LIB_${lib}}")
+ endforeach()
+
+ if(lang STREQUAL "CXX")
+ # Now we actually create the component
+ add_library(${COMPONENT} SHARED ${${COMPONENT}_SOURCES})
+ # Link required libraries and Slice libraries
+ list(APPEND boostlibs ${HYDRA_BOOST_LIBRARIES} ${${COMPONENT}_BOOST_LIBRARIES})
+ if(boostlibs)
+ list(REMOVE_DUPLICATES boostlibs)
+ foreach(lib ${boostlibs})
+ string(TOUPPER ${lib} libtag)
+ list(APPEND target_libs "${Boost_${libtag}_LIBRARY}")
+ endforeach()
+ endif()
+ target_link_libraries(${COMPONENT} ${${COMPONENT}_SLICES} ${target_libs})
+ elseif(lang STREQUAL "CSharp")
+ csharp_add_library(${COMPONENT} ${${COMPONENT}_SOURCES} REFERENCES ${${COMPONENT}_SLICES} ${target_libs})
+ endif()
+endfunction()
+
# Function which adds information for installing a component
function(hydra_component_install COMPONENTNAME TYPE DIR DESC GROUP)
install(TARGETS ${COMPONENTNAME} ${TYPE} DESTINATION ${DIR} COMPONENT ${COMPONENTNAME})
-----------------------------------------------------------------------
--
asterisk-scf/release/cmake.git
More information about the asterisk-scf-commits
mailing list