Introduce BOOST_SOURCE_ROOT for out-of-tree Boost sources
This commit is contained in:
parent
805826c160
commit
8f32d814c8
2 changed files with 9 additions and 1 deletions
9
3rdparty/CMakeLists.txt
vendored
9
3rdparty/CMakeLists.txt
vendored
|
|
@ -2,7 +2,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
|
|||
set(BOOST_INCLUDE_LIBRARIES random stacktrace math)
|
||||
set(BOOST_ENABLE_COMPATIBILITY_TARGETS 1)
|
||||
add_compile_options(-fdeclspec) # math doesn't build otherwise
|
||||
add_subdirectory(boost EXCLUDE_FROM_ALL)
|
||||
|
||||
# Use out-of-tree sources for boost, since we can't use pre-built
|
||||
# libraries for the web build
|
||||
if(BOOST_SOURCE_ROOT)
|
||||
add_subdirectory(${BOOST_SOURCE_ROOT} boost EXCLUDE_FROM_ALL)
|
||||
else()
|
||||
message(FATAL_ERROR "For web builds BOOST_SOURCE_ROOT must be provided")
|
||||
endif()
|
||||
|
||||
# TODO: make this available via find_package so we wouldn't have to
|
||||
# special-case it in every library
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ rm -rf ./*
|
|||
# Use emsdk wrapper for cmake - it sets some env variables to select the
|
||||
# right toolchain.
|
||||
emcmake cmake \
|
||||
-DBOOST_SOURCE_ROOT=$(realpath ../source)/psemek/3rdparty/boost \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPSEMEK_PACKAGE_MODE=ON \
|
||||
-DPSEMEK_PACKAGE_HOST=OFF \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue