Android 编译通过,但肯定运行不了
This commit is contained in:
@@ -8,10 +8,16 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
message(STATUS "Building for Android")
|
||||
|
||||
include_directories(
|
||||
|
||||
)
|
||||
|
||||
add_library(sample SHARED
|
||||
app/src/main/cpp/main.cpp
|
||||
app/src/main/cpp/AndroidOut.cpp
|
||||
vulkan/Application.h
|
||||
vulkan/Application.cpp
|
||||
)
|
||||
|
||||
find_package(game-activity REQUIRED CONFIG)
|
||||
@@ -20,11 +26,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS
|
||||
"${CMAKE_SHARED_LINKER_FLAGS} -u Java_com_google_androidgamesdk_GameActivity_initializeNativeCode")
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
target_link_libraries(sample
|
||||
game-activity::game-activity_static
|
||||
Vulkan::Vulkan
|
||||
android
|
||||
log)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user