aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/compiler/cmake/android/NvCloth.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'NvCloth/compiler/cmake/android/NvCloth.cmake')
-rw-r--r--NvCloth/compiler/cmake/android/NvCloth.cmake33
1 files changed, 26 insertions, 7 deletions
diff --git a/NvCloth/compiler/cmake/android/NvCloth.cmake b/NvCloth/compiler/cmake/android/NvCloth.cmake
index 8463368..13fb92f 100644
--- a/NvCloth/compiler/cmake/android/NvCloth.cmake
+++ b/NvCloth/compiler/cmake/android/NvCloth.cmake
@@ -6,16 +6,25 @@ SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
SET(NVCLOTH_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../)
+if(${ANDROID_ABI} STREQUAL "armeabi-v7a with NEON" OR ${ANDROID_ABI} STREQUAL "arm64-v8a")
+ SET(NVCLOTH_PLATFORM_NEON_FILES
+ ${PROJECT_ROOT_DIR}/src/neon/NeonCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSelfCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
+ )
+else()
+ SET(NVCLOTH_PLATFORM_NEON_FILES
+ )
+endif()
+
SET(NVCLOTH_PLATFORM_SOURCE_FILES
${PROJECT_ROOT_DIR}/src/ps/unix/PsUnixAtomic.cpp
${PROJECT_ROOT_DIR}/src/ps/unix/PsUnixFPU.h
${PROJECT_ROOT_DIR}/src/ps/android/cpu-features.c
${PROJECT_ROOT_DIR}/src/ps/android/cpu-features.h
- ${PROJECT_ROOT_DIR}/src/neon/NeonCollision.cpp
- ${PROJECT_ROOT_DIR}/src/neon/NeonSelfCollision.cpp
- ${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
- ${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
+ ${NVCLOTH_PLATFORM_NEON_FILES}
)
SET(NVCLOTH_PLATFORM_INCLUDES
@@ -23,14 +32,18 @@ SET(NVCLOTH_PLATFORM_INCLUDES
${ANDROID_NDK}/sources/android/cpufeatures
)
+IF(PX_STATIC_LIBRARIES)
+ SET(NVCLOTH_API_COMPILE_DEFS NV_CLOTH_IMPORT=;PX_CALL_CONV=;)
+ELSE()
+ SET(NVCLOTH_API_COMPILE_DEFS NV_CLOTH_IMPORT=PX_DLL_EXPORT;)
+ENDIF()
+
# Use generator expressions to set config specific preprocessor definitions
SET(NVCLOTH_COMPILE_DEFS
${NVCLOTH_ANDROID_COMPILE_DEFS};
- NvCloth_STATIC_LIB; # TODO: needed?
+ ${NVCLOTH_API_COMPILE_DEFS}
NV_ANDROID
- NV_SIMD_SCALAR=1 # always compile scalar paths on android, so we may use them as fallback
- NV_CLOTH_IMPORT=PX_DLL_EXPORT
NV_CLOTH_ENABLE_DX11=0
NV_CLOTH_ENABLE_CUDA=0
@@ -40,5 +53,11 @@ SET(NVCLOTH_COMPILE_DEFS
$<$<CONFIG:release>:${NVCLOTH_ANDROID_RELEASE_COMPILE_DEFS};>
)
+IF(PX_STATIC_LIBRARIES)
+ SET(NVCLOTH_LIBTYPE STATIC)
+ELSE()
+ SET(NVCLOTH_LIBTYPE SHARED)
+ENDIF()
+
# include common low level settings
INCLUDE(../common/NvCloth.cmake)