deps: Fix boost build on MacOS
This commit is contained in:
parent
d632d91e79
commit
581bbc85d6
2
deps/CMakeLists.txt
vendored
2
deps/CMakeLists.txt
vendored
@ -72,7 +72,7 @@ elseif (APPLE)
|
|||||||
message(FATAL_ERROR "Could not determine OS X SDK version. Please use -DCMAKE_OSX_DEPLOYMENT_TARGET=<version>")
|
message(FATAL_ERROR "Could not determine OS X SDK version. Please use -DCMAKE_OSX_DEPLOYMENT_TARGET=<version>")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
message("OS X Deployment Target (inferred from default): ${DEP_OSX_TARGET}")
|
message("OS X Deployment Target (inferred from SDK): ${DEP_OSX_TARGET}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include("deps-macos.cmake")
|
include("deps-macos.cmake")
|
||||||
|
19
deps/deps-macos.cmake
vendored
19
deps/deps-macos.cmake
vendored
@ -6,7 +6,7 @@ set(DEP_WERRORS_SDK "-Werror=partial-availability -Werror=unguarded-availability
|
|||||||
set(DEP_CMAKE_OPTS
|
set(DEP_CMAKE_OPTS
|
||||||
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
|
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
|
||||||
"-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}"
|
"-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}"
|
||||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}"
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEP_OSX_TARGET}"
|
||||||
"-DCMAKE_CXX_FLAGS=${DEP_WERRORS_SDK}"
|
"-DCMAKE_CXX_FLAGS=${DEP_WERRORS_SDK}"
|
||||||
"-DCMAKE_C_FLAGS=${DEP_WERRORS_SDK}"
|
"-DCMAKE_C_FLAGS=${DEP_WERRORS_SDK}"
|
||||||
)
|
)
|
||||||
@ -14,28 +14,27 @@ set(DEP_CMAKE_OPTS
|
|||||||
include("deps-unix-common.cmake")
|
include("deps-unix-common.cmake")
|
||||||
|
|
||||||
|
|
||||||
set(DEP_BOOST_OSX_TARGET "")
|
|
||||||
if (CMAKE_OSX_DEPLOYMENT_TARGET)
|
|
||||||
set(DEP_BOOST_OSX_TARGET "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
ExternalProject_Add(dep_boost
|
ExternalProject_Add(dep_boost
|
||||||
EXCLUDE_FROM_ALL 1
|
EXCLUDE_FROM_ALL 1
|
||||||
URL "https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz"
|
URL "https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.gz"
|
||||||
URL_HASH SHA256=bd0df411efd9a585e5a2212275f8762079fed8842264954675a4fddc46cfcf60
|
URL_HASH SHA256=96b34f7468f26a141f6020efb813f1a2f3dfb9797ecf76a7d7cbd843cc95f5bd
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND ./bootstrap.sh
|
CONFIGURE_COMMAND ./bootstrap.sh
|
||||||
|
--with-toolset=clang
|
||||||
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex
|
--with-libraries=system,iostreams,filesystem,thread,log,locale,regex
|
||||||
"--prefix=${DESTDIR}/usr/local"
|
"--prefix=${DESTDIR}/usr/local"
|
||||||
BUILD_COMMAND ./b2
|
BUILD_COMMAND ./b2
|
||||||
-j ${NPROC}
|
-j ${NPROC}
|
||||||
--reconfigure
|
--reconfigure
|
||||||
|
toolset=clang
|
||||||
link=static
|
link=static
|
||||||
variant=release
|
variant=release
|
||||||
threading=multi
|
threading=multi
|
||||||
boost.locale.icu=off
|
boost.locale.icu=off
|
||||||
"cflags=-fPIC ${DEP_BOOST_OSX_TARGET}"
|
"cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
"cxxflags=-fPIC ${DEP_BOOST_OSX_TARGET}"
|
"cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
|
"mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
|
"mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
|
||||||
install
|
install
|
||||||
INSTALL_COMMAND "" # b2 does that already
|
INSTALL_COMMAND "" # b2 does that already
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user