清理cpp 内容, 只保留主文件。CMakeLists.txt 采用根目录的。
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.22.1)
|
||||
|
||||
project("sample")
|
||||
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
message(STATUS "Building for Android")
|
||||
|
||||
add_library(sample SHARED
|
||||
app/src/main/cpp/main.cpp
|
||||
app/src/main/cpp/AndroidOut.cpp
|
||||
)
|
||||
|
||||
find_package(game-activity REQUIRED CONFIG)
|
||||
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS
|
||||
"${CMAKE_SHARED_LINKER_FLAGS} -u Java_com_google_androidgamesdk_GameActivity_initializeNativeCode")
|
||||
|
||||
|
||||
target_link_libraries(sample
|
||||
game-activity::game-activity_static
|
||||
android
|
||||
log)
|
||||
endif()
|
||||
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR WIN32)
|
||||
message(STATUS "Building for Windows")
|
||||
|
||||
endif()
|
||||
Reference in New Issue
Block a user