I am currently trying to build vtk for android using these commands:
cmake -S vtk-master -B vtk-android-build -DVTK_ANDROID_BUILD=ON
cmake --build vtk-android-build
The build is with the vtk version from the master branch, and android-ndk-r21e. The build runs smoothly up to 81%, then fails with the error below:
[ 81%] Performing configure step for 'vtk-android'
-- Android: Targeting API '27' with architecture 'arm', ABI 'armeabi', and processor 'armv5te'
-- Android: Selected unified Clang toolchain
-- The C compiler identification is Clang 9.0.9
-- The CXX compiler identification is Clang 9.0.9
-- Check for working C compiler: /home/cmengich/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
-- Check for working C compiler: /home/cmengich/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/cmengich/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
-- Check for working CXX compiler: /home/cmengich/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could not use git to determine source version, using version
-- Setting build type to 'Debug' as none was specified.
CMake Error at CMake/vtkCrossCompiling.cmake:7 (find_package):
Could not find a configuration file for package "VTKCompileTools" that is
compatible with requested version "".
The following configuration files were considered but not accepted:
/home/cmengich/Software/vtk-android-build/CompileTools/vtkcompiletools-config.cmake, version: 9.1.20211011 (64bit)
Call Stack (most recent call first):
CMakeLists.txt:57 (include)
-- Configuring incomplete, errors occurred!
See also "/home/cmengich/Software/vtk-android-build/CMakeExternals/Build/vtk-android-27-armeabi/CMakeFiles/CMakeOutput.log".
make[2]: *** [CMakeFiles/vtk-android.dir/build.make:108: CMakeExternals/Prefix/vtk-android-27-armeabi/src/vtk-android-stamp/vtk-android-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/vtk-android.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Any suggestions as to how to get passed this error?
Or any suggestions on the best way to build vtk for android that works?