Improve astc cmake for ios

This commit is contained in:
halx99 2021-06-06 16:15:26 +08:00
parent 5ea8a8f5fc
commit b787a57bf2
1 changed files with 5 additions and 4 deletions

View File

@ -71,13 +71,10 @@ if (NOT DEFINED ISA_SIMD)
}" ASTC_HAVE_SSE4_INTRINSICS)
endif()
### restore CMAKE_REQUIRED_FLAGS
set(CMAKE_REQUIRED_FLAGS ${OLD_REQUIRED_FLAGS})
unset(OLD_REQUIRED_FLAGS)
### check neon
check_include_file(arm_neon.h ASTC_HAVE_ARM_NEON_H)
if(ASTC_HAVE_ARM_NEON_H)
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
check_cxx_source_compiles("#include <arm_neon.h>
int main()
{
@ -88,6 +85,10 @@ if (NOT DEFINED ISA_SIMD)
}" ASTC_HAVE_NEON_INTRINSICS)
endif()
### restore CMAKE_REQUIRED_FLAGS
set(CMAKE_REQUIRED_FLAGS ${OLD_REQUIRED_FLAGS})
unset(OLD_REQUIRED_FLAGS)
### set ISA_SIMD
if(ASTC_HAVE_MSSE2_SWITCH)
set(ISA_SIMD "sse2")