cmake_minimum_required(VERSION 3.10)

project(monodroid)

enable_language(C ASM)

if(ANDROID_NDK_MAJOR VERSION_LESS "23")
    message(FATAL_ERROR "Error: need at least Android NDK 23, got ${ANDROID_NDK_REVISION}!")
endif()

add_compile_options(-Werror=missing-prototypes -Werror=missing-declarations -Wall -std=c99)

add_library(
    monodroid
    SHARED
    %MONODROID_SOURCE%
    %AotModulesSource%
)

%AotSources%

%Defines%

include_directories("%MonoInclude%")

target_link_libraries(
    monodroid
    PRIVATE
    libz.so
    log
    %NativeLibrariesToLink%
    %APP_LINKER_ARGS%
)
