readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
383 stars 164 forks source link

Support for Android NDK sysroot/usr/include/[arm-linux-androideabi] #302

Closed danielweck closed 6 years ago

danielweck commented 6 years ago

Once Android Studio updates the NDK and build tool dependencies, the readium-sdk build fails. This is because the headers are now centralized in sysroot/usr/include/[arm-linux-androideabi]. I have a working fix in the develop branch for Gradle experimental (NDK DSL), and I will include the additional include directives for Gradle stable (old-school Makefiles). This will have to be patched in the CMake scripts for readium-lcp-client too...

danielweck commented 6 years ago

Note that the compiler failure actually occurs only with Gradle experimental (which launches the NDK build process via the Gradle DSL), whereas the Gradle stable build succeeds (traditional makefiles, direct invocation of the ndk-build command line from Gradle script).

danielweck commented 6 years ago

Fixed via: https://github.com/readium/readium-sdk/commit/106874aca005b7b73969da7db6917d9b7afe5796#diff-ed0a5d8cb9aa9169d481288143a603bc

danielweck commented 6 years ago

Note that the CMake build in readium-lcp-client works, because NDK sysroot is automatically "mounted" to the includes.