Fix vendor libs build for other ABIs
This commit is contained in:
parent
6cd6d9ef5d
commit
f89ac70d59
@ -9,7 +9,7 @@ set(SOURCES
|
|||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
|
#target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils fspp-interface cryfs-cli)
|
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils fspp-interface cryfs-cli)
|
||||||
|
|
||||||
target_add_boost(${PROJECT_NAME})
|
target_add_boost(${PROJECT_NAME})
|
||||||
|
38
vendor/boost/CMakeLists.txt
vendored
38
vendor/boost/CMakeLists.txt
vendored
@ -2,18 +2,19 @@ project(libboost)
|
|||||||
|
|
||||||
add_library(boost INTERFACE)
|
add_library(boost INTERFACE)
|
||||||
set(BOOST_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_ANDROID_ARCH_ABI}")
|
set(BOOST_OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/build/${CMAKE_ANDROID_ARCH_ABI}")
|
||||||
set(BOOST_STATIC_LIBS
|
#set(BOOST_STATIC_LIBS
|
||||||
${BOOST_OUTPUT}/lib/libboost_atomic-clang-mt-a64-1_76.a
|
# ${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_chrono-clang-mt-a64-1_76.a
|
||||||
${BOOST_OUTPUT}/lib/libboost_container-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_date_time-clang-mt-a64-1_76.a
|
||||||
${BOOST_OUTPUT}/lib/libboost_exception-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_filesystem-clang-mt-a64-1_76.a
|
||||||
${BOOST_OUTPUT}/lib/libboost_serialization-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_system-clang-mt-a64-1_76.a
|
||||||
${BOOST_OUTPUT}/lib/libboost_thread-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
|
# ${BOOST_OUTPUT}/lib/libboost_wserialization-clang-mt-a64-1_76.a
|
||||||
)
|
#)
|
||||||
|
file(GLOB BOOST_STATIC_LIBS CONFIGURE_DEPENDS ${BOOST_OUTPUT}/lib/libboost_*.a)
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
vendor_boost
|
vendor_boost
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/android-build.sh ${CMAKE_ANDROID_NDK} ${CMAKE_ANDROID_ARCH_ABI}
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/android-build.sh ${CMAKE_ANDROID_NDK} ${CMAKE_ANDROID_ARCH_ABI}
|
||||||
@ -22,15 +23,4 @@ add_custom_target(
|
|||||||
)
|
)
|
||||||
add_dependencies(boost vendor_boost)
|
add_dependencies(boost vendor_boost)
|
||||||
target_include_directories(boost SYSTEM INTERFACE ${BOOST_OUTPUT}/include/boost-1_76)
|
target_include_directories(boost SYSTEM INTERFACE ${BOOST_OUTPUT}/include/boost-1_76)
|
||||||
target_link_libraries(boost INTERFACE
|
target_link_libraries(boost INTERFACE ${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
|
|
||||||
)
|
|
||||||
|
1
vendor/cryptopp/CMakeLists.txt
vendored
1
vendor/cryptopp/CMakeLists.txt
vendored
@ -25,5 +25,4 @@ add_custom_target(
|
|||||||
BYPRODUCTS ${LIBCRYPTOPP_A}
|
BYPRODUCTS ${LIBCRYPTOPP_A}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
#add_dependencies(cryptopp vendor_cryptopp)
|
|
||||||
target_link_libraries(cryptopp INTERFACE ${LIBCRYPTOPP_A})
|
target_link_libraries(cryptopp INTERFACE ${LIBCRYPTOPP_A})
|
||||||
|
6
vendor/cryptopp/android-build.sh
vendored
6
vendor/cryptopp/android-build.sh
vendored
@ -1,7 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -f "vendor_cryptopp/build/$2/libcryptopp.a" ]; then
|
||||||
|
echo "Crypto++ already built for $2";
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
export ANDROID_NDK_ROOT=$1 && \
|
export ANDROID_NDK_ROOT=$1 && \
|
||||||
cd vendor_cryptopp && \
|
cd vendor_cryptopp && \
|
||||||
|
make clean && \
|
||||||
mkdir -p build/$2 && \
|
mkdir -p build/$2 && \
|
||||||
source TestScripts/setenv-android.sh 21 $2 && \
|
source TestScripts/setenv-android.sh 21 $2 && \
|
||||||
make -f GNUmakefile-cross static && \
|
make -f GNUmakefile-cross static && \
|
||||||
|
@ -240,12 +240,12 @@ case "$ANDROID_CPU" in
|
|||||||
# ANDROID_CPPFLAGS="-D__ANDROID__=${ANDROID_API}"
|
# ANDROID_CPPFLAGS="-D__ANDROID__=${ANDROID_API}"
|
||||||
|
|
||||||
ANDROID_CFLAGS="-target i686-none-linux-android${ANDROID_API}"
|
ANDROID_CFLAGS="-target i686-none-linux-android${ANDROID_API}"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -mtune=intel -mssse3 -mfpmath=sse"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -mssse3 -mfpmath=sse"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fno-addrsig -fno-experimental-isel"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fno-addrsig -fno-experimental-isel"
|
||||||
|
|
||||||
ANDROID_CXXFLAGS="-target i686-none-linux-android${ANDROID_API}"
|
ANDROID_CXXFLAGS="-target i686-none-linux-android${ANDROID_API}"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -mtune=intel -mssse3 -mfpmath=sse"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -mssse3 -mfpmath=sse"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -std=c++11 -stdlib=libc++"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -std=c++11 -stdlib=libc++"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel"
|
||||||
@ -261,12 +261,12 @@ case "$ANDROID_CPU" in
|
|||||||
# ANDROID_CPPFLAGS="-D__ANDROID__=${ANDROID_API}"
|
# ANDROID_CPPFLAGS="-D__ANDROID__=${ANDROID_API}"
|
||||||
|
|
||||||
ANDROID_CFLAGS="-target x86_64-none-linux-android${ANDROID_API}"
|
ANDROID_CFLAGS="-target x86_64-none-linux-android${ANDROID_API}"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -march=x86-64 -msse4.2 -mpopcnt -mtune=intel"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -march=x86-64 -msse4.2 -mpopcnt"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
||||||
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fno-addrsig -fno-experimental-isel"
|
ANDROID_CFLAGS="${ANDROID_CFLAGS} -fno-addrsig -fno-experimental-isel"
|
||||||
|
|
||||||
ANDROID_CXXFLAGS="-target x86_64-none-linux-android${ANDROID_API}"
|
ANDROID_CXXFLAGS="-target x86_64-none-linux-android${ANDROID_API}"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -march=x86-64 -msse4.2 -mpopcnt -mtune=intel"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -march=x86-64 -msse4.2 -mpopcnt"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -std=c++11 -stdlib=libc++"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -std=c++11 -stdlib=libc++"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fstack-protector-strong -funwind-tables -fexceptions -frtti"
|
||||||
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel"
|
ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel"
|
||||||
|
Loading…
Reference in New Issue
Block a user