cmake_minimum_required(VERSION 3.18)
project(<<.M.Name>> CXX)
set(CMAKE_CXX_STANDARD 20)
enable_testing()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(AddAidlLibrary)
include(AppendCxxFlagsIfSupported)
include(FindThreads)

if (NOT ANDROID_BUILD_TOP)
    set(ANDROID_BUILD_TOP "${CMAKE_CURRENT_SOURCE_DIR}")
endif()

<<cflagsList .M.Name "_CFLAGS" .M.Properties.Cflags .M.Properties.Unportable_flags .M.Properties.Cflags_ignored>>

<<range .Pprop.SystemPackages ->>
find_package(<<.>> REQUIRED)
<<end >>
<<range .Pprop.PregeneratedPackages ->>
add_subdirectory("${ANDROID_BUILD_TOP}/<<.>>" "<<.>>/build" EXCLUDE_FROM_ALL)
<<end>>
add_compile_options(${<<.M.Name>>_CFLAGS})
link_libraries(${CMAKE_THREAD_LIBS_INIT})
<<range $moduleDir, $value := .ModuleDirs ->>
add_subdirectory(<<$moduleDir>>)
<<end>>
