Fix Windows Phone ARM Build

pull/170/head
zabulus 2016-05-07 18:51:53 +03:00
parent 18175ada54
commit 95f961249d
1 changed files with 19 additions and 14 deletions

View File

@ -51,7 +51,7 @@ if(NOT CRYPTOPP_DATA_DIR STREQUAL "")
add_definitions(-DCRYPTOPP_DATA_DIR="${CRYPTOPP_DATA_DIR}")
endif()
if(WINDOWS_STORE)
if(WINDOWS_STORE OR WINDOWS_PHONE)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"winapifamily.h\"" )
endif()
#============================================================================
@ -86,7 +86,11 @@ if(MINGW OR WIN32)
endif()
if(MSVC AND NOT DISABLE_ASM)
if(CMAKE_CL_64)
if(${CMAKE_GENERATOR} MATCHES ".*ARM")
message(STATUS "Disabling ASM because ARM is specified as target platform.")
add_definitions(-DCRYPTOPP_DISABLE_ASM)
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm)
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/x64masm.asm)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/x64dll.asm PROPERTIES COMPILE_FLAGS "/D_M_X64")
@ -100,6 +104,7 @@ if(MSVC AND NOT DISABLE_ASM)
list(APPEND cryptopp_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/rdrand.asm)
enable_language(ASM_MASM)
endif()
endif()
#============================================================================
# Compile targets