[asterisk-scf-commits] asterisk-scf/integration/cmake.git branch "boostctl" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Dec 3 13:04:54 CST 2010
branch "boostctl" has been created
at d2670821ede9f2bb3df11839b81fca9980d972cc (commit)
- Log -----------------------------------------------------------------
commit d2670821ede9f2bb3df11839b81fca9980d972cc
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Dec 3 12:58:56 2010 -0600
Manage boost link options in CMake.
diff --git a/AsteriskSCF.cmake b/AsteriskSCF.cmake
index 641ec29..71e6e01 100644
--- a/AsteriskSCF.cmake
+++ b/AsteriskSCF.cmake
@@ -277,10 +277,12 @@ function(asterisk_scf_project NAME ICE_VERSION)
project(${NAME} ${ARGN})
# On Windows, IceBox C++ services must be compiled with some symbols exported;
# the source code should use ASTERISK_SCF_ICEBOX_EXPORT to accomplish this, and this
- # block will ensure it contains the correct value.
+
if(WIN32)
message(STATUS "Setting ASTERISK_SCF_ICEBOX_EXPORT definition for Windows IceBox services")
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=__declspec\(dllexport\))
+ # Disable auto-linker for boost on windows
+ add_definitions(-DBOOST_ALL_NO_LIB)
else()
add_definitions(-DASTERISK_SCF_ICEBOX_EXPORT=)
endif()
@@ -353,8 +355,14 @@ function(asterisk_scf_add_boost_libraries)
endif()
set(libs ${ASTERISK_SCF_BOOST_LIBRARIES})
foreach(lib ${ARGN})
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
+ if (lib MATCHES "[-]DBOOST.*")
+ # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
+ add_definitions(${lib})
+ message(STATUS "Definition added for ${lib}")
+ else()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
+ endif()
endforeach()
list(REMOVE_DUPLICATES libs)
set(ASTERISK_SCF_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
@@ -781,8 +789,14 @@ function(asterisk_scf_component_add_boost_libraries COMPONENT)
else()
message(FATAL_ERROR "Boost libraries cannot be used with components in the ${lang} language")
endif()
- find_Boost_library(${lib})
- list(APPEND libs ${lib})
+ if (lib MATCHES "[-]DBOOST.*")
+ # Common params: -DBOOST_ALL_DYN_LINK, -DBOOST_TEST_DYN_LINK
+ add_definitions(${lib})
+ message(STATUS "Definition added for ${lib}")
+ else()
+ find_Boost_library(${lib})
+ list(APPEND libs ${lib})
+ endif()
endforeach()
list(REMOVE_DUPLICATES libs)
set(${COMPONENT}_BOOST_LIBRARIES ${libs} PARENT_SCOPE)
-----------------------------------------------------------------------
--
asterisk-scf/integration/cmake.git
More information about the asterisk-scf-commits
mailing list