aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/compiler/cmake/android/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'NvCloth/compiler/cmake/android/CMakeLists.txt')
-rw-r--r--NvCloth/compiler/cmake/android/CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/NvCloth/compiler/cmake/android/CMakeLists.txt b/NvCloth/compiler/cmake/android/CMakeLists.txt
index 7ef0673..da911d1 100644
--- a/NvCloth/compiler/cmake/android/CMakeLists.txt
+++ b/NvCloth/compiler/cmake/android/CMakeLists.txt
@@ -16,14 +16,19 @@ ENDIF()
if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
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 ")
+ SET(NVCLOTH_ANDROID_ABI_DEFS __arm__;PX_SIMD_DISABLED)
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 ")
+ SET(NVCLOTH_ANDROID_ABI_DEFS __arm__;__ARM_NEON__;NV_SIMD_SCALAR=1)
elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -ffast-math -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof ")
+ SET(NVCLOTH_ANDROID_ABI_DEFS __arm64__;__ARM_NEON__)
elseif(${ANDROID_ABI} STREQUAL "x86")
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 ")
+ SET(NVCLOTH_ANDROID_ABI_DEFS __i386__)
elseif(${ANDROID_ABI} STREQUAL "x86_64")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -mstackrealign -msse3 ")
+ SET(NVCLOTH_ANDROID_ABI_DEFS __x86_64__)
endif()
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
@@ -33,8 +38,7 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
# a version from pxshared
#SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;)
-# TODO: __ARM_NEON__;__arm64__ only on supporting archs
-SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;PX_NVCLOTH_STATIC_LIB;__ARM_NEON__;__arm64__)
+SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;${NVCLOTH_ANDROID_ABI_DEFS})
SET(NVCLOTH_ANDROID_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
SET(NVCLOTH_ANDROID_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
SET(NVCLOTH_ANDROID_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1)