diff --git a/CMakeLists.txt b/CMakeLists.txt index 9182340b5..163cba32e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -516,7 +516,7 @@ if(ANDROID) if(ANDROID_ABI STREQUAL arm64-v8a) # https://github.com/android/ndk/issues/910 - add_definitions(-D__ARM_NEON__) + add_definitions(-D__ARM_NEON) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp") endif() diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 0eaceb67f..eb5194d18 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -215,7 +215,13 @@ if(FAAC_FOUND) endif() if(WITH_NEON) - set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon" ) + check_symbol_exists("_M_AMD64" "" MSVC_ARM64) + check_symbol_exists("__aarch64__" "" ARCH_ARM64) + + if (NOT MSVC_ARM64 AND NOT ARCH_ARM64) + set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon" ) + endif() + set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_NEON_SRCS}) endif() diff --git a/libfreerdp/codec/rfx_neon.c b/libfreerdp/codec/rfx_neon.c index c98955ade..8a9bd8bcf 100644 --- a/libfreerdp/codec/rfx_neon.c +++ b/libfreerdp/codec/rfx_neon.c @@ -21,7 +21,7 @@ #include "config.h" #endif -#if defined(__ARM_NEON__) +#if defined(__ARM_NEON) #include #include @@ -241,4 +241,4 @@ void rfx_init_neon(RFX_CONTEXT* context) } } -#endif // __ARM_NEON__ +#endif // __ARM_NEON