[boost-modular-build-helper] Dynamic build support

Use stage directory instead of intermediate build directory to provide
all the required symlinks generated by boost build

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
This commit is contained in:
Andrei Lebedev 2019-05-19 21:52:11 +03:00
parent ef2d3ff6d0
commit b91e8ad279
3 changed files with 15 additions and 4 deletions

View File

@ -158,9 +158,12 @@ add_custom_target(boost ALL
threading=multi
threadapi=pthread
debug-symbols=on
stage
WORKING_DIRECTORY ${SOURCE_PATH}/build
)
set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/stage/lib)
install(
CODE "file(GLOB LIBS ${CMAKE_CURRENT_BINARY_DIR}/boost/build/*/*.a)\nif(LIBS)\nfile(INSTALL \${LIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/lib\")\nendif()"
CODE "file(GLOB LIBS ${SUBDIR}/*.so.* ${SUBDIR}/*.so ${SUBDIR}/*.a ${SUBDIR}/*.dylib ${SUBDIR}/*.dylib.*)\nif(LIBS)\nfile(INSTALL \${LIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/lib\")\nendif()"
)

View File

@ -1,2 +1,2 @@
Source: boost-modular-build-helper
Version: 1.70.0-1
Version: 1.70.0-2

View File

@ -40,8 +40,16 @@ function(boost_modular_build)
set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib)
else()
set(BOOST_LIB_PREFIX lib)
set(BOOST_LIB_RELEASE_SUFFIX .a)
set(BOOST_LIB_DEBUG_SUFFIX .a)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(BOOST_LIB_RELEASE_SUFFIX .a)
set(BOOST_LIB_DEBUG_SUFFIX .a)
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(BOOST_LIB_RELEASE_SUFFIX .dylib)
set(BOOST_LIB_DEBUG_SUFFIX .dylib)
else()
set(BOOST_LIB_RELEASE_SUFFIX .so)
set(BOOST_LIB_DEBUG_SUFFIX .so)
endif()
endif()
if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2")