From 17ce6d32628e3ff3285e73b910f18a2aaccf38c2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 26 Nov 2018 12:21:03 +0100 Subject: [PATCH] Remove obsolete ANDROID_NDK_HOST_X64 option 32-bit host support was removed from the NDK and android.toolchain.cmake sets ANDROID_NDK_HOST_X64 unconditionally. --- build_cpp.sh | 7 +----- build_cpp_isolated.sh | 54 ------------------------------------------- utils.sh | 6 +---- 3 files changed, 2 insertions(+), 65 deletions(-) delete mode 100755 build_cpp_isolated.sh diff --git a/build_cpp.sh b/build_cpp.sh index 57f2550..af02d35 100755 --- a/build_cpp.sh +++ b/build_cpp.sh @@ -77,11 +77,6 @@ cmd_exists catkin_make || die 'catkin_make was not found' [ "$CMAKE_PREFIX_PATH" = "" ] && die 'could not find target basedir. Have you run build_catkin.sh and sourced setup.bash?' [ "$RBA_TOOLCHAIN" = "" ] && die 'could not find android.toolchain.cmake, you should set RBA_TOOLCHAIN variable.' -# check if system is 64 bits -if echo $system | grep _64 >/dev/null; then - host64='-DANDROID_NDK_HOST_X64=YES' -fi - # get the prefix path prefix=$(cd $TARGET_PATH && pwd) @@ -108,7 +103,7 @@ catkin config \ --cmake-args \ -DCMAKE_TOOLCHAIN_FILE=$RBA_TOOLCHAIN \ -DUSE_CATKIN=ON -DCMAKE_TOOLCHAIN_FILE=$RBA_TOOLCHAIN \ - -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=$platform $host64 \ + -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=$platform \ -DPYTHON_EXECUTABLE=$python -DPYTHON_LIBRARY=$python_lib \ -DPYTHON_INCLUDE_DIR=$python_inc -DPYTHON_INCLUDE_DIR2=$python2_inc \ -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_PREFIX=$CMAKE_PREFIX_PATH \ diff --git a/build_cpp_isolated.sh b/build_cpp_isolated.sh deleted file mode 100755 index 812debd..0000000 --- a/build_cpp_isolated.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# Abort script on any failures -set -e - -my_loc="$(cd "$(dirname $0)" && pwd)" -source $my_loc/config.sh -source $my_loc/utils.sh - -if [ $# == 0 ] || [ $1 == '-h' ] || [ $1 == '--help' ]; then - echo "Usage: $0 prefix_path" - echo " example: $0 /home/user/my_workspace" - exit 1 -fi - -cmd_exists catkin_make || die 'catkin_make was not found' -[ "$CMAKE_PREFIX_PATH" = "" ] && die 'could not find target basedir. Have you run build_catkin.sh and sourced setup.bash?' -[ "$RBA_TOOLCHAIN" = "" ] && die 'could not find android.toolchain.cmake, you should set RBA_TOOLCHAIN variable.' - -if echo $system | grep _64 >/dev/null; then - host64='-DANDROID_NDK_HOST_X64=YES' -fi - -if [[ $2 == "--debug-symbols" ]] ; then - CMAKE_BUILD_TYPE=Debug -else - CMAKE_BUILD_TYPE=Release -fi - -prefix=$(cd $1 && pwd) - -python=$(which python) -python_lib=/usr/lib/x86_64-linux-gnu/libpython2.7.so -python_inc=/usr/include/python2.7 -python2_inc=/usr/include/x86_64-linux-gnu/python2.7 - -cd $prefix/catkin_ws - -echo -echo -e '\e[34mRunning catkin_make.\e[39m' -echo - -catkin_make_isolated --quiet --build $prefix/catkin_ws/build --devel $prefix/catkin_ws/devel --install --cmake-args -DCMAKE_TOOLCHAIN_FILE=$RBA_TOOLCHAIN -DANDROID_TOOLCHAIN_NAME=$toolchain -DANDROID_NATIVE_API_LEVEL=$platform $host64 -DPYTHON_EXECUTABLE=$python -DPYTHON_LIBRARY=$python_lib -DPYTHON_INCLUDE_DIR=$python_inc -DPYTHON_INCLUDE_DIR2=$python2_inc -DBUILD_SHARED_LIBS=0 -DCMAKE_INSTALL_PREFIX=$CMAKE_PREFIX_PATH -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT=$CMAKE_PREFIX_PATH -DANDROID=TRUE -DBOOST_INCLUDEDIR=$CMAKE_PREFIX_PATH/include/boost -DBOOST_LIBRARYDIR=$CMAKE_PREFIX_PATH/lib -DROSCONSOLE_BACKEND=print -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - #-DBoost_DEBUG=ON \ - #-DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT:PATHNAME=$CMAKE_PREFIX_PATH/include/boost \ - #-DBOOST_INCLUDEDIR:PATH=$CMAKE_PREFIX_PATH/include/boost -DBOOST_LIBRARYDIR:PATH=$CMAKE_PREFIX_PATH/lib \ - #-DBoost_USE_STATIC_LIBS=ON -DBoost_NO_BOOST_CMAKE=ON - - # -DBOOST_INCLUDEDIR:PATH=$CMAKE_PREFIX_PATH/include -DBOOST_LIBRARYDIR:PATH=$CMAKE_PREFIX_PATH/lib - # -DBOOST_ROOT:PATHNAME=$CMAKE_PREFIX_PATH/include - -echo -echo -e '\e[34mInstalling.\e[39m' -echo diff --git a/utils.sh b/utils.sh index 1937583..7e7f7c6 100644 --- a/utils.sh +++ b/utils.sh @@ -42,17 +42,13 @@ cmake_build() { [ "$CMAKE_PREFIX_PATH" = "" ] && die 'could not find target basedir. Have you run build_catkin.sh and sourced setup.bash?' [ "$RBA_TOOLCHAIN" = "" ] && die 'could not find android.toolchain.cmake, you should set RBA_TOOLCHAIN variable.' - if echo $system | grep _64 >/dev/null; then - host64='-DANDROID_NDK_HOST_X64=YES' - fi - target=$CMAKE_PREFIX_PATH python=$(which python) cd $1 mkdir -p build && cd build cmake .. -DCMAKE_TOOLCHAIN_FILE=$RBA_TOOLCHAIN \ - -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=$platform $host64 \ + -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=$platform \ -DPYTHON_EXECUTABLE=$python -DCMAKE_INSTALL_PREFIX=$target -DBUILD_SHARED_LIBS=0 -DPCL_SHARED_LIBS=FALSE \ -DCMAKE_FIND_ROOT_PATH=$target make -j$PARALLEL_JOBS -l$PARALLEL_JOBS install