Add msvc flag definition for ARM64
This commit is contained in:
parent
56c4c845e8
commit
db1f457ff9
|
@ -239,12 +239,34 @@ if( WIN32 )
|
||||||
# _USE_MATH_DEFINES is set.
|
# _USE_MATH_DEFINES is set.
|
||||||
add_definitions( -D_USE_MATH_DEFINES )
|
add_definitions( -D_USE_MATH_DEFINES )
|
||||||
|
|
||||||
|
|
||||||
# We need the arch for the resource compiler later
|
# We need the arch for the resource compiler later
|
||||||
if ( NOT CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
if( MSVC )
|
||||||
set( KICAD_BUILD_ARCH "x86" )
|
if("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM64")
|
||||||
elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
set( KICAD_BUILD_ARCH "arm64" )
|
||||||
set( KICAD_BUILD_ARCH "x64" )
|
set( KICAD_BUILD_ARCH_ARM64 1 )
|
||||||
|
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "ARM")
|
||||||
|
set( KICAD_BUILD_ARCH "arm" )
|
||||||
|
set( KICAD_BUILD_ARCH_ARM64 1 )
|
||||||
|
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "X86")
|
||||||
|
set( KICAD_BUILD_ARCH "x86" )
|
||||||
|
set( KICAD_BUILD_ARCH_X86 1 )
|
||||||
|
elseif("${MSVC_C_ARCHITECTURE_ID}" STREQUAL "x64")
|
||||||
|
set( KICAD_BUILD_ARCH "x64" )
|
||||||
|
set( KICAD_BUILD_ARCH_X64 1 )
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Failed to determine the MSVC target architecture: ${MSVC_C_ARCHITECTURE_ID}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if ( NOT CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||||
|
set( KICAD_BUILD_ARCH "x86" )
|
||||||
|
set( KICAD_BUILD_ARCH_X86 1 )
|
||||||
|
elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||||
|
set( KICAD_BUILD_ARCH "x64" )
|
||||||
|
set( KICAD_BUILD_ARCH_X64 1 )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions( -DKICAD_BUILD_ARCH=${KICAD_BUILD_ARCH} )
|
add_definitions( -DKICAD_BUILD_ARCH=${KICAD_BUILD_ARCH} )
|
||||||
|
|
||||||
if( KICAD_WIN32_DPI_AWARE )
|
if( KICAD_WIN32_DPI_AWARE )
|
||||||
|
|
|
@ -17,13 +17,13 @@ if( MSVC )
|
||||||
enable_language(ASM_MASM)
|
enable_language(ASM_MASM)
|
||||||
|
|
||||||
if( NOT LIBCONTEXT_USE_WINFIBER )
|
if( NOT LIBCONTEXT_USE_WINFIBER )
|
||||||
if ( NOT CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
if ( KICAD_BUILD_ARCH_X84 )
|
||||||
set( CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /safeseh" )
|
set( CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /safeseh" )
|
||||||
list(APPEND LIBCONTEXT_SOURCES
|
list(APPEND LIBCONTEXT_SOURCES
|
||||||
make_i386_ms_pe_masm.asm
|
make_i386_ms_pe_masm.asm
|
||||||
jump_i386_ms_pe_masm.asm
|
jump_i386_ms_pe_masm.asm
|
||||||
)
|
)
|
||||||
elseif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
elseif( KICAD_BUILD_ARCH_X64 )
|
||||||
list(APPEND LIBCONTEXT_SOURCES
|
list(APPEND LIBCONTEXT_SOURCES
|
||||||
make_x86_64_ms_pe_masm.asm
|
make_x86_64_ms_pe_masm.asm
|
||||||
jump_x86_64_ms_pe_masm.asm
|
jump_x86_64_ms_pe_masm.asm
|
||||||
|
|
Loading…
Reference in New Issue