|
|
It's when using CMake, in both cases invoking a CMake toolchain file, and having FLTK built with the application/library I'm building. Also just trying to build FLTK as a library before installing it. So options 1, 2 and 3 are true.
Example usage:
$ git clone --depth 1 https://github.com/fltk/fltk
$ cd fltk
$ cmake -Bbin -S. -DFLTK_BUILD_TEST=OFF -DCMAKE_TOOLCHAIN_FILE=D:\Android\Sdk\ndk\21.1.6352462\build\cmake\android.toolchain.cmake
Would fail.
Also using Android Studio:
- Create a native C++ app, accept defaults.
- Navigate to the Android generated CMakeLists
- Git clone and git submodule add fltk in the same directory.
- Replace contents of CMakeLists with:
cmake_minimum_required(VERSION 3.10)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate")
set(FLTK_BUILD_TEST OFF CACHE BOOL " " FORCE)
add_subdirectory(fltk)
add_library(native-lib SHARED native-lib.cpp)
target_include_directories(native-lib PRIVATE fltk ${CMAKE_BINARY_DIR}/fltk)
target_link_libraries(native-lib PRIVATE fltk fltk_images fltk_jpeg fltk_z fltk_png)
target_link_libraries(native-lib PUBLIC log android)
- Replace native-lib.cpp code with any FLTK code.
- Run the build (invokes gradle which calls cmake).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |