Created
September 18, 2022 06:23
-
-
Save deniska/c52f096af2f88ee902f6bd55eaf4c53e to your computer and use it in GitHub Desktop.
CMakeLists.txt for raylib based android project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.18.1) | |
project("raylibtestproject") | |
add_library(main | |
SHARED | |
raylibtestcode.c) # my source files | |
set(PLATFORM Android CACHE STRING "" FORCE) | |
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) | |
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) | |
add_subdirectory(${CMAKE_SOURCE_DIR}/libs/raylib) | |
add_library(app-glue | |
STATIC | |
${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c) | |
set(CMAKE_SHARED_LINKER_FLAGS | |
"${CMAKE_SHARED_LINKER_FLAGS} -u ANativeActivity_onCreate") | |
target_link_libraries(main app-glue android log EGL GLESv2 raylib) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment