Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: STAND with support for CMAKE /w NDK #2

Open
ArtificialRaccoon opened this issue Dec 6, 2022 · 1 comment
Open

Comments

@ArtificialRaccoon
Copy link

STAND appears to have been built around supporting autotools for building various libraries in BAD. This works fine for many components, but the following have since abandoned autotools for CMAKE:

GEOS (3.10 and later only support CMAKE)
GDAL (3.6.0 only supports CMAKE)
PROJ (Post 8.2.1 only supports CMAKE)

When building with CMAKE (and targeting Android), you need to specify the NDK toolchain file using the following parameters:

    -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake \
    -DANDROID_NDK=${NDK_ROOT}                               \
    -DANDROID_ABI=armeabi-v7a                               \
    -DANDROID_PLATFORM=android-19                           \
    -DANDROID_STL=c++_shared                                \
    -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${LIB1_DIRECTORY}/libs/armeabi-v7a       \
    ${LIB1_DIRECTORY}

STAND appears to not include the toolchain file, and the NDK directory structure appears to be laid out differently than the source archive (android-ndk-r23c-linux.zip).

Would it be possible to build a set of STAND images which support CMAKE?

@rhardih
Copy link
Owner

rhardih commented Feb 26, 2023

It's a bit cumbersome, because it needs special casing in the make files on a per version basis, but it's definitely doable. Case in point, Tesseract 4.0.0 is using CMake whilst earlier versions are Autotools.

Autotools: https://github.com/rhardih/bad/blob/master/tesseract/tesseract-3.05.02.Dockerfile
CMake: https://github.com/rhardih/bad/blob/master/tesseract/tesseract-4.0.0.Dockerfile

I wonder if there's a more generic approach to lay out the makefiles and maintain different docker images depending on which build system to use. 🤔

@rhardih rhardih reopened this Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants