Enhance Windows build configuration and architecture detection
- Added architecture detection in CMakeLists.txt for Windows, defining appropriate compile flags for ARM64, x64, and x86 platforms. - Updated yaze.vcxproj to include Debug and Release configurations for ARM64, ensuring proper setup for ARM64 builds. - Modified GitHub Actions workflow to support packaging for Windows ARM64, creating artifacts for both x64 and ARM64 builds.
This commit is contained in:
@@ -98,6 +98,20 @@ elseif(YAZE_PLATFORM_MACOS)
|
||||
elseif(YAZE_PLATFORM_WINDOWS)
|
||||
include(cmake/vcpkg.cmake)
|
||||
target_compile_definitions(yaze_common INTERFACE WINDOWS)
|
||||
|
||||
# Windows-specific architecture detection and configuration
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64|aarch64")
|
||||
target_compile_definitions(yaze_common INTERFACE YAZE_ARCH_ARM64)
|
||||
message(STATUS "Building for Windows ARM64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|x86_64")
|
||||
target_compile_definitions(yaze_common INTERFACE YAZE_ARCH_X64)
|
||||
message(STATUS "Building for Windows x64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386|i686|x86")
|
||||
target_compile_definitions(yaze_common INTERFACE YAZE_ARCH_X86)
|
||||
message(STATUS "Building for Windows x86")
|
||||
else()
|
||||
message(WARNING "Unknown Windows architecture: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Compiler-specific settings
|
||||
|
||||
Reference in New Issue
Block a user