Fix boost build
This commit is contained in:
parent
f89ac70d59
commit
ac2b8a615b
37
vendor/boost/CMakeLists.txt
vendored
37
vendor/boost/CMakeLists.txt
vendored
@ -2,19 +2,30 @@ project(libboost)
|
||||
|
||||
add_library(boost INTERFACE)
|
||||
set(BOOST_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_ANDROID_ARCH_ABI}")
|
||||
#set(BOOST_STATIC_LIBS
|
||||
# ${BOOST_OUTPUT}/lib/libboost_atomic-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_chrono-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_container-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_date_time-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_exception-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_filesystem-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_serialization-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_system-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_thread-clang-mt-a64-1_76.a
|
||||
# ${BOOST_OUTPUT}/lib/libboost_wserialization-clang-mt-a64-1_76.a
|
||||
#)
|
||||
file(GLOB BOOST_STATIC_LIBS CONFIGURE_DEPENDS ${BOOST_OUTPUT}/lib/libboost_*.a)
|
||||
|
||||
if(CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a")
|
||||
set(BOOST_ARCH "a64")
|
||||
elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a")
|
||||
set(BOOST_ARCH "a32")
|
||||
elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL "x86")
|
||||
set(BOOST_ARCH "x32")
|
||||
elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64")
|
||||
set(BOOST_ARCH "x64")
|
||||
else()
|
||||
message(FATAL_ERROR "Android ABI not supported: ${CMAKE_ANDROID_ARCH_ABI}")
|
||||
endif()
|
||||
set(BOOST_STATIC_LIBS
|
||||
${BOOST_OUTPUT}/lib/libboost_atomic-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_chrono-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_container-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_date_time-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_exception-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_filesystem-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_serialization-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_system-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_thread-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
${BOOST_OUTPUT}/lib/libboost_wserialization-clang-mt-${BOOST_ARCH}-1_76.a
|
||||
)
|
||||
add_custom_target(
|
||||
vendor_boost
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/android-build.sh ${CMAKE_ANDROID_NDK} ${CMAKE_ANDROID_ARCH_ABI}
|
||||
|
2
vendor/boost/android-build.sh
vendored
2
vendor/boost/android-build.sh
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ls build/$2/lib/libboost_*.a 1>&2 2>/dev/null; then
|
||||
if [ $(find build/$2/lib -name libboost_*.a |wc -l) -eq 10 ]; then
|
||||
echo "boost already built for $2";
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user