mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 01:40:05 +00:00
cryptopp: Fix compilation on non-x86/x86_64 systems
This commit is contained in:
parent
39fce60145
commit
46f43bc4f7
17
externals/cryptopp/CMakeLists.txt
vendored
17
externals/cryptopp/CMakeLists.txt
vendored
@ -189,13 +189,20 @@ if(MSVC AND NOT CRYPTOPP_DISABLE_ASM)
|
||||
endif()
|
||||
|
||||
if ((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT CRYPTOPP_DISABLE_ASM)
|
||||
if(${CMAKE_GENERATOR} MATCHES ".*ARM")
|
||||
message(STATUS "Disabling ASM because ARM is specified as target platform.")
|
||||
else()
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sha-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
||||
check_cxx_compiler_flag(-msse2 CRYPTOPP_HAS_MSSE2)
|
||||
check_cxx_compiler_flag(-msse4.1 CRYPTOPP_HAS_MSSE41)
|
||||
check_cxx_compiler_flag(-msse4.2 CRYPTOPP_HAS_MSSE42)
|
||||
check_cxx_compiler_flag(-maes CRYPTOPP_HAS_MAES)
|
||||
check_cxx_compiler_flag(-msha CRYPTOPP_HAS_MSHA)
|
||||
if (CRYPTOPP_HAS_MSSE2)
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sse-simd.cpp PROPERTIES COMPILE_FLAGS "-msse2")
|
||||
endif()
|
||||
if (CRYPTOPP_HAS_MSSE41 AND CRYPTOPP_HAS_MAES)
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/rijndael-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.1 -maes")
|
||||
endif()
|
||||
if (CRYPTOPP_HAS_MSSE42 AND CRYPTOPP_HAS_MSHA)
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/cryptopp/sha-simd.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#============================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user