aboutsummaryrefslogtreecommitdiff
path: root/PxShared/src/compiler/cmake/Android/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'PxShared/src/compiler/cmake/Android/CMakeLists.txt')
-rw-r--r--PxShared/src/compiler/cmake/Android/CMakeLists.txt25
1 files changed, 14 insertions, 11 deletions
diff --git a/PxShared/src/compiler/cmake/Android/CMakeLists.txt b/PxShared/src/compiler/cmake/Android/CMakeLists.txt
index 0499c29..9aa00f9 100644
--- a/PxShared/src/compiler/cmake/Android/CMakeLists.txt
+++ b/PxShared/src/compiler/cmake/Android/CMakeLists.txt
@@ -1,34 +1,37 @@
cmake_minimum_required(VERSION 3.3)
+PROJECT(PxShared )
include(../common/CMakeLists.txt)
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
-IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to Android
- SET(TARGET_BUILD_PLATFORM "Android")
+IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to android
+ SET(TARGET_BUILD_PLATFORM "android")
ENDIF()
-SET(PLATFORM_LIST Android)
+SET(PLATFORM_LIST android)
IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST)
MESSAGE(FATAL_ERROR "Invalid platform:" ${TARGET_BUILD_PLATFORM})
ENDIF()
if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -D__STDC_LIMIT_MACROS -Wno-invalid-offsetof ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "armeabi-v7a with NEON")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -ffast-math -fno-exceptions -ffunction-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -D__STDC_LIMIT_MACROS -Wno-invalid-offsetof ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof ")
elseif(${ANDROID_ABI} STREQUAL "x86")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -D__STDC_LIMIT_MACROS -Wno-invalid-offsetof -fpack-struct=8 -malign-double ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -fpack-struct=8 -malign-double ")
elseif(${ANDROID_ABI} STREQUAL "x86_64")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -D__STDC_LIMIT_MACROS -Wno-invalid-offsetof -mstackrealign -msse3 ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -mstackrealign -msse3 ")
endif()
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-SET(CMAKE_CXX_FLAGS_CHECKED "-O2")
-SET(CMAKE_CXX_FLAGS_PROFILE "-O2")
-SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
+SET(CMAKE_CXX_FLAGS_CHECKED "-O3")
+SET(CMAKE_CXX_FLAGS_PROFILE "-O3")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
-SET(PXSHARED_ANDROID_COMPILE_DEFS _LIB;)
+SET(PXSHARED_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;)
SET(PXSHARED_ANDROID_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
SET(PXSHARED_ANDROID_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
SET(PXSHARED_ANDROID_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1)