mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-11 18:32:35 +08:00
Testing - Add support for ARM64 architecture (#1149)
- Allow the custom `tcl` vcpkg port to build on Windows ARM64 and map vcpkg architecture to Tcl’s NMAKE build flags. - Add a `target-arch` input to the composite GitHub Actions used to configure/build OCCT, selecting the correct CMake `-A` architecture and vcpkg triplet. - Adjust OCCT CMake vcpkg feature list macros to update `VCPKG_MANIFEST_FEATURES` in the current scope.
This commit is contained in:
@@ -842,12 +842,12 @@ function (PROCESS_CSF_LIBRARIES CURRENT_CSF LIST_NAME TARGET_NAME)
|
||||
endfunction()
|
||||
macro(OCCT_ADD_VCPKG_FEATURE THE_FEATURE)
|
||||
if (BUILD_USE_VCPKG)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "${THE_FEATURE}" PARENT_SCOPE)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "${THE_FEATURE}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro (OCCT_UNSET_VCPKG_FEATURE THE_FEATURE)
|
||||
if (BUILD_USE_VCPKG)
|
||||
list (REMOVE_ITEM VCPKG_MANIFEST_FEATURES "${THE_FEATURE}" PARENT_SCOPE)
|
||||
list (REMOVE_ITEM VCPKG_MANIFEST_FEATURES "${THE_FEATURE}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -33,19 +33,17 @@ endif()
|
||||
|
||||
# Use Windows NMAKE build for MSVC, but Unix build for MinGW
|
||||
if (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(TCL_BUILD_MACHINE_STR MACHINE=AMD64)
|
||||
set(TCL_BUILD_ARCH_STR ARCH=AMD64)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(TCL_BUILD_MACHINE_STR MACHINE=ARM64)
|
||||
set(TCL_BUILD_ARCH_STR ARCH=ARM64)
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(TCL_BUILD_MACHINE_STR MACHINE=IX86)
|
||||
set(TCL_BUILD_ARCH_STR ARCH=IX86)
|
||||
else()
|
||||
# Default fallback for unknown architectures
|
||||
set(TCL_BUILD_MACHINE_STR MACHINE=IX86)
|
||||
set(TCL_BUILD_ARCH_STR ARCH=IX86)
|
||||
message(FATAL_ERROR "Unsupported Windows Tcl architecture: ${VCPKG_TARGET_ARCHITECTURE}")
|
||||
endif()
|
||||
|
||||
# Handle features
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"port-version": 1,
|
||||
"description": "Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications.",
|
||||
"homepage": "https://github.com/tcltk/tcl",
|
||||
"supports": "!android & !(windows & arm) & !uwp",
|
||||
"supports": "!android & !uwp & (!(windows & arm) | (windows & arm64))",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user