-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
38 lines (29 loc) · 1.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required(VERSION 3.21)
set(NDK_PATH /Users/jiangnight/Library/Android/sdk/ndk/r27_goron)
set(CMAKE_SYSTEM_NAME ANDROID)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_SYSTEM_VERSION 21)
set(ANDROID_PLATFORM 21)
set(ANDROID_ABI arm64-v8a)
set(ANDROID_NDK ${NDK_PATH})
set(CMAKE_TOOLCHAIN_FILE ${NDK_PATH}/build/cmake/android.toolchain.cmake)
set(ANDROID_SDK_ROOT ${NDK_PATH})
project(OSImGui)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -irobf-cse -Wno-error=format-security -fexceptions -fvisibility=hidden -DNDEBUG -O2 -w")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/outputs/${CMAKE_ANDROID_ARCH_ABI}/) # 重定向输出产物
# CMake头文件设置
FILE(GLOB_RECURSE FILE_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h*)
FILE(GLOB_RECURSE FILE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c*)
include_directories(
include/
include/imgui
include/utils
)
add_executable(${PROJECT_NAME}
${FILE_SOURCES}
)
target_link_libraries(${PROJECT_NAME} PRIVATE
EGL log android GLESv3
)