diff --git a/src/fspp/fuse/CMakeLists.txt b/src/fspp/fuse/CMakeLists.txt index 8bb22415..c563f749 100644 --- a/src/fspp/fuse/CMakeLists.txt +++ b/src/fspp/fuse/CMakeLists.txt @@ -9,7 +9,7 @@ set(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_add_boost(${PROJECT_NAME}) diff --git a/vendor/boost/CMakeLists.txt b/vendor/boost/CMakeLists.txt index 6c35170f..74baf1f0 100644 --- a/vendor/boost/CMakeLists.txt +++ b/vendor/boost/CMakeLists.txt @@ -2,18 +2,19 @@ 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 -) +#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) add_custom_target( vendor_boost 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) target_include_directories(boost SYSTEM INTERFACE ${BOOST_OUTPUT}/include/boost-1_76) -target_link_libraries(boost INTERFACE - ${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 -) +target_link_libraries(boost INTERFACE ${BOOST_STATIC_LIBS}) diff --git a/vendor/cryptopp/CMakeLists.txt b/vendor/cryptopp/CMakeLists.txt index 7af9ec72..7608edb0 100644 --- a/vendor/cryptopp/CMakeLists.txt +++ b/vendor/cryptopp/CMakeLists.txt @@ -25,5 +25,4 @@ add_custom_target( BYPRODUCTS ${LIBCRYPTOPP_A} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -#add_dependencies(cryptopp vendor_cryptopp) target_link_libraries(cryptopp INTERFACE ${LIBCRYPTOPP_A}) diff --git a/vendor/cryptopp/android-build.sh b/vendor/cryptopp/android-build.sh index 89a77081..6aedfb17 100755 --- a/vendor/cryptopp/android-build.sh +++ b/vendor/cryptopp/android-build.sh @@ -1,7 +1,13 @@ #!/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 && \ cd vendor_cryptopp && \ +make clean && \ mkdir -p build/$2 && \ source TestScripts/setenv-android.sh 21 $2 && \ make -f GNUmakefile-cross static && \ diff --git a/vendor/cryptopp/vendor_cryptopp/TestScripts/setenv-android.sh b/vendor/cryptopp/vendor_cryptopp/TestScripts/setenv-android.sh index f265fc57..83075b11 100755 --- a/vendor/cryptopp/vendor_cryptopp/TestScripts/setenv-android.sh +++ b/vendor/cryptopp/vendor_cryptopp/TestScripts/setenv-android.sh @@ -240,12 +240,12 @@ case "$ANDROID_CPU" in # ANDROID_CPPFLAGS="-D__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} -fno-addrsig -fno-experimental-isel" 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} -fstack-protector-strong -funwind-tables -fexceptions -frtti" ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel" @@ -261,12 +261,12 @@ case "$ANDROID_CPU" in # ANDROID_CPPFLAGS="-D__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} -fno-addrsig -fno-experimental-isel" 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} -fstack-protector-strong -funwind-tables -fexceptions -frtti" ANDROID_CXXFLAGS="${ANDROID_CXXFLAGS} -fno-addrsig -fno-experimental-isel"