Adding first APK build
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -380,9 +380,25 @@
|
||||
-include precompiled.h
|
||||
)
|
||||
|
||||
-add_executable(systemshock
|
||||
- ${MAC_SRC}
|
||||
-)
|
||||
+# Android has no standalone executables (Java loads a shared library via
|
||||
+# JNI instead), so this is the one part of this file Android needs to
|
||||
+# override - see android/engine-patches/. Everything else here (sources,
|
||||
+# dependency discovery, link libraries) is untouched and applies the same
|
||||
+# way on both platforms. ANDROID_EXTRA_SOURCES (passed in by
|
||||
+# android/app/build.gradle) is QuestShockActivity's own small native
|
||||
+# helper (android/app/src/main/cpp/) - not part of engine/ itself.
|
||||
+if(ANDROID)
|
||||
+ set(SHOCKOLATE_TARGET main)
|
||||
+ add_library(${SHOCKOLATE_TARGET} SHARED
|
||||
+ ${MAC_SRC}
|
||||
+ ${ANDROID_EXTRA_SOURCES}
|
||||
+ )
|
||||
+else()
|
||||
+ set(SHOCKOLATE_TARGET systemshock)
|
||||
+ add_executable(${SHOCKOLATE_TARGET}
|
||||
+ ${MAC_SRC}
|
||||
+ )
|
||||
+endif()
|
||||
|
||||
add_library(GAME_LIB ${GAME_SRC})
|
||||
|
||||
@@ -391,7 +407,7 @@
|
||||
set(WINDOWS_LIBRARIES "mingw32 -mwindows")
|
||||
endif(MINGW)
|
||||
|
||||
-target_link_libraries(systemshock
|
||||
+target_link_libraries(${SHOCKOLATE_TARGET}
|
||||
${WINDOWS_LIBRARIES} # Set it before any linker options! Beware WinMain@16 error!!
|
||||
GAME_LIB
|
||||
UI_LIB
|
||||
@@ -418,7 +434,10 @@
|
||||
${ALSA_LIBRARIES}
|
||||
)
|
||||
|
||||
-# Turn on address sanitizing if wanted
|
||||
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/sanitizers/cmake" ${CMAKE_MODULE_PATH})
|
||||
-find_package(Sanitizers)
|
||||
-add_sanitizers(systemshock)
|
||||
+# Turn on address sanitizing if wanted (desktop only - not meaningful for
|
||||
+# an Android release build)
|
||||
+if(NOT ANDROID)
|
||||
+ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/sanitizers/cmake" ${CMAKE_MODULE_PATH})
|
||||
+ find_package(Sanitizers)
|
||||
+ add_sanitizers(${SHOCKOLATE_TARGET})
|
||||
+endif()
|
||||
Reference in New Issue
Block a user