From 6ed115e25c17d9b059cb78688cbcebadbbb9bc8f Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 03:42:49 +0200 Subject: [PATCH 01/96] all changes --- CMakeCache.txt | 490 ++++++++++++++++++ CMakePresets.json | 28 + DartConfiguration.tcl | 109 ++++ cmake-arm64-config.cmake | 13 + .../vcpkg-custom-triplets/arm64-windows.cmake | 10 + platform/windows/windows-arm64-fixup.cmake | 39 ++ platform/windows/windows-arm64-platform.cmake | 60 +++ platform/windows/windows.cmake | 206 +++++--- 8 files changed, 885 insertions(+), 70 deletions(-) create mode 100644 CMakeCache.txt create mode 100644 DartConfiguration.tcl create mode 100644 cmake-arm64-config.cmake create mode 100644 platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake create mode 100644 platform/windows/windows-arm64-fixup.cmake create mode 100644 platform/windows/windows-arm64-platform.cmake diff --git a/CMakeCache.txt b/CMakeCache.txt new file mode 100644 index 000000000000..4901830a101f --- /dev/null +++ b/CMakeCache.txt @@ -0,0 +1,490 @@ +# This is the CMakeCache file. +# For build in directory: c:/Users/birks/source/repos/maplibre-native-cleanup +# It was generated by CMake: C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Build the testing tree. +BUILD_TESTING:BOOL=ON + +//Path to a program. +CMAKE_AR:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/lib.exe + +//Semicolon separated list of supported configuration types, only +// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything +// else will be ignored. +CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /EHsc + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=/Zi /Ob0 /Od /RTC1 + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=/O2 /Ob2 /DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG + +//Libraries linked by default with all C++ applications. +CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=/Zi /Ob0 /Od /RTC1 + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=/O2 /Ob2 /DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG + +//Libraries linked by default with all C applications. +CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING=/machine:ARM64 + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/CMakeFiles/pkgRedirects + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/MapLibre Native + +//Path to a program. +CMAKE_LINKER:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/link.exe + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:ARM64 + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//Path to a program. +CMAKE_MT:FILEPATH=C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/mt.exe + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=MapLibre Native + +//RC compiler +CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/rc.exe + +//Flags for Windows Resource Compiler during all build types. +CMAKE_RC_FLAGS:STRING=-DWIN32 + +//Flags for Windows Resource Compiler during DEBUG builds. +CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG + +//Flags for Windows Resource Compiler during MINSIZEREL builds. +CMAKE_RC_FLAGS_MINSIZEREL:STRING= + +//Flags for Windows Resource Compiler during RELEASE builds. +CMAKE_RC_FLAGS_RELEASE:STRING= + +//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. +CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:ARM64 + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:ARM64 + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//No help, variable specified on the command line. +CMAKE_SYSTEM_NAME:UNINITIALIZED=Windows + +//No help, variable specified on the command line. +CMAKE_TOOLCHAIN_FILE:UNINITIALIZED=C:/Users/birks/source/repos/maplibre-native-cleanup/cmake-arm64-config.cmake + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Path to the coverage program that CTest uses for performing coverage +// inspection +COVERAGE_COMMAND:FILEPATH=COVERAGE_COMMAND-NOTFOUND + +//Extra command line flags to pass to the coverage tool +COVERAGE_EXTRA_FLAGS:STRING=-l + +//How many times to retry timed-out CTest submissions. +CTEST_SUBMIT_RETRY_COUNT:STRING=3 + +//How long to wait between timed-out CTest submissions. +CTEST_SUBMIT_RETRY_DELAY:STRING=5 + +//Maximum time allowed before CTest will kill the test. +DART_TESTING_TIMEOUT:STRING=1500 + +//Disable support of compressed WOFF2 fonts. +FT_DISABLE_BROTLI:BOOL=ON + +//Disable support of bzip2 compressed fonts. +FT_DISABLE_BZIP2:BOOL=OFF + +//Disable HarfBuzz (used for improving auto-hinting of OpenType +// fonts). +FT_DISABLE_HARFBUZZ:BOOL=OFF + +//Disable support of PNG compressed OpenType embedded bitmaps. +FT_DISABLE_PNG:BOOL=OFF + +//Disable use of system zlib and use internal zlib library instead. +FT_DISABLE_ZLIB:BOOL=ON + +//Enable support for meaningful error descriptions. +FT_ENABLE_ERROR_STRINGS:BOOL=OFF + +//Require support of bzip2 compressed fonts. +FT_REQUIRE_BZIP2:BOOL=OFF + +//Require HarfBuzz for improving auto-hinting of OpenType fonts. +FT_REQUIRE_HARFBUZZ:BOOL=OFF + +//Require support of PNG compressed OpenType embedded bitmaps. +FT_REQUIRE_PNG:BOOL=OFF + +//Path to a program. +GITCOMMAND:FILEPATH=C:/Program Files/Git/clangarm64/bin/git.exe + +//Command to build the project +MAKECOMMAND:STRING="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config "${CTEST_CONFIGURATION_TYPE}" + +//Path to the memory checking command, used for memory error detection. +MEMORYCHECK_COMMAND:FILEPATH=MEMORYCHECK_COMMAND-NOTFOUND + +//File that contains suppressions for the memory checker +MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH= + +//Include depdendencies in static build of core +MLN_CORE_INCLUDE_DEPS:BOOL=OFF + +//Create autoreleasepool in render loop +MLN_CREATE_AUTORELEASEPOOL:BOOL=OFF + +//Use haffbuzz to shape complex text +MLN_TEXT_SHAPING_HARFBUZZ:BOOL=ON + +//Use components in Rust +MLN_USE_RUST:BOOL=OFF + +//Enable Tracy instrumentation +MLN_USE_TRACY:BOOL=OFF + +//Use ankerl dense containers for performance +MLN_USE_UNORDERED_DENSE:BOOL=ON + +//Build with clang-tidy checks enabled +MLN_WITH_CLANG_TIDY:BOOL=OFF + +//Build only the core bits, no platform code +MLN_WITH_CORE_ONLY:BOOL=OFF + +//Enable code coverage collection +MLN_WITH_COVERAGE:BOOL=OFF + +//Build with EGL renderer +MLN_WITH_EGL:BOOL=OFF + +//Set up targets for GLFW platform +MLN_WITH_GLFW:BOOL=ON + +//Build MapLibre Native Node.js bindings +MLN_WITH_NODE:BOOL=OFF + +//Build with OpenGL renderer +MLN_WITH_OPENGL:BOOL=ON + +//Build with PMTiles support +MLN_WITH_PMTILES:BOOL=ON + +//Build MapLibre Native Qt bindings +MLN_WITH_QT:BOOL=OFF + +//Compile with runtime type information +MLN_WITH_RTTI:BOOL=OFF + +//Use [address|thread|undefined] here +MLN_WITH_SANITIZER:BOOL=OFF + +//Build with Vulkan renderer +MLN_WITH_VULKAN:BOOL=OFF + +//Make all compilation warnings errors +MLN_WITH_WERROR:BOOL=ON + +//Value Computed by CMake +MapLibre Native_BINARY_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup + +//Value Computed by CMake +MapLibre Native_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +MapLibre Native_SOURCE_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup + +//Name of the computer/site where compile is being run +SITE:STRING=LAPTOP-7UCOIEMV + +VCPKG_TARGET_TRIPLET:STRING=arm64-windows + +//Value Computed by CMake +freetype_BINARY_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/vendor/freetype + +//Value Computed by CMake +freetype_IS_TOP_LEVEL:STATIC=OFF + +//Value Computed by CMake +freetype_SOURCE_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/vendor/freetype + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/birks/source/repos/maplibre-native-cleanup +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=31 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=6 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe +//ADVANCED property for variable: CMAKE_CTEST_COMMAND +CMAKE_CTEST_COMMAND-ADVANCED:INTERNAL=1 +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES +CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES +CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022 +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL=ARM64 +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/birks/source/repos/maplibre-native-cleanup +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MT +CMAKE_MT-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//noop for ranlib +CMAKE_RANLIB:INTERNAL=: +//ADVANCED property for variable: CMAKE_RC_COMPILER +CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_RC_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS +CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG +CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL +CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE +CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO +CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.31 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: COVERAGE_COMMAND +COVERAGE_COMMAND-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: COVERAGE_EXTRA_FLAGS +COVERAGE_EXTRA_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CTEST_SUBMIT_RETRY_COUNT +CTEST_SUBMIT_RETRY_COUNT-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CTEST_SUBMIT_RETRY_DELAY +CTEST_SUBMIT_RETRY_DELAY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: DART_TESTING_TIMEOUT +DART_TESTING_TIMEOUT-ADVANCED:INTERNAL=1 +//Require support of compressed WOFF2 fonts. +FT_REQUIRE_BROTLI:INTERNAL=OFF +//Require system zlib instead of internal zlib library. +FT_REQUIRE_ZLIB:INTERNAL=OFF +//ADVANCED property for variable: GITCOMMAND +GITCOMMAND-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MAKECOMMAND +MAKECOMMAND-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MEMORYCHECK_COMMAND +MEMORYCHECK_COMMAND-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: MEMORYCHECK_SUPPRESSIONS_FILE +MEMORYCHECK_SUPPRESSIONS_FILE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: SITE +SITE-ADVANCED:INTERNAL=1 + diff --git a/CMakePresets.json b/CMakePresets.json index b60e0de1d044..7f316b6d689f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -6,6 +6,34 @@ "patch": 0 }, "configurePresets": [ + { + "name": "windows-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_OPENGL": "OFF", + "MLN_WITH_EGL": "OFF", + "MLN_WITH_VULKAN": "OFF", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake-arm64-config.cmake", + "MLN_WITH_GLFW": "OFF" + } +}, +{ + "name": "windows-arm64-opengl", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 OpenGL", + "description": "Windows ARM64 build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_OPENGL": "ON", + "MLN_WITH_GLFW": "ON" + } +}, { "name": "ios", "displayName": "iOS", diff --git a/DartConfiguration.tcl b/DartConfiguration.tcl new file mode 100644 index 000000000000..098e8fedb850 --- /dev/null +++ b/DartConfiguration.tcl @@ -0,0 +1,109 @@ +# This file is configured by CMake automatically as DartConfiguration.tcl +# If you choose not to use CMake, this file may be hand configured, by +# filling in the required variables. + + +# Configuration directories and files +SourceDirectory: C:/Users/birks/source/repos/maplibre-native-cleanup +BuildDirectory: C:/Users/birks/source/repos/maplibre-native-cleanup + +# Where to place the cost data store +CostDataFile: + +# Site is something like machine.domain, i.e. pragmatic.crd +Site: LAPTOP-7UCOIEMV + +# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ +BuildName: Win32-MSBuild + +# Subprojects +LabelsForSubprojects: + +# Submission information +SubmitURL: http:// +SubmitInactivityTimeout: + +# Dashboard start time +NightlyStartTime: 00:00:00 EDT + +# Commands for the build/test/submit cycle +ConfigureCommand: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" "C:/Users/birks/source/repos/maplibre-native-cleanup" +MakeCommand: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config "${CTEST_CONFIGURATION_TYPE}" +DefaultCTestConfigurationType: Release + +# version control +UpdateVersionOnly: + +# CVS options +# Default is "-d -P -A" +CVSCommand: +CVSUpdateOptions: + +# Subversion options +SVNCommand: +SVNOptions: +SVNUpdateOptions: + +# Git options +GITCommand: C:/Program Files/Git/clangarm64/bin/git.exe +GITInitSubmodules: +GITUpdateOptions: +GITUpdateCustom: + +# Perforce options +P4Command: +P4Client: +P4Options: +P4UpdateOptions: +P4UpdateCustom: + +# Generic update command +UpdateCommand: C:/Program Files/Git/clangarm64/bin/git.exe +UpdateOptions: +UpdateType: git + +# Compiler info +Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/cl.exe +CompilerVersion: 19.44.35213.0 + +# Dynamic analysis (MemCheck) +PurifyCommand: +ValgrindCommand: +ValgrindCommandOptions: +DrMemoryCommand: +DrMemoryCommandOptions: +CudaSanitizerCommand: +CudaSanitizerCommandOptions: +MemoryCheckType: +MemoryCheckSanitizerOptions: +MemoryCheckCommand: MEMORYCHECK_COMMAND-NOTFOUND +MemoryCheckCommandOptions: --leak-check=full --gen-suppressions=all --error-exitcode=1 --suppressions=C:/Users/birks/source/repos/maplibre-native-cleanup/scripts/valgrind.sup +MemoryCheckSuppressionFile: + +# Coverage +CoverageCommand: COVERAGE_COMMAND-NOTFOUND +CoverageExtraFlags: -l + +# Testing options +# TimeOut is the amount of time in seconds to wait for processes +# to complete during testing. After TimeOut seconds, the +# process will be summarily terminated. +# Currently set to 25 minutes +TimeOut: 1500 + +# During parallel testing CTest will not start a new test if doing +# so would cause the system load to exceed this value. +TestLoad: + +TLSVerify: +TLSVersion: + +UseLaunchers: 0 +CurlOptions: +# warning, if you add new options here that have to do with submit, +# you have to update cmCTestSubmitCommand.cxx + +# For CTest submissions that timeout, these options +# specify behavior for retrying the submission +CTestSubmitRetryDelay: 5 +CTestSubmitRetryCount: 3 diff --git a/cmake-arm64-config.cmake b/cmake-arm64-config.cmake new file mode 100644 index 000000000000..f2a303e749f8 --- /dev/null +++ b/cmake-arm64-config.cmake @@ -0,0 +1,13 @@ +# ARM64 Windows configuration for MapLibre Native + +# Set vcpkg for ARM64 +set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "") +set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg-custom-triplets) + +# Include vcpkg toolchain +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") +endif() + +# Add path to vcpkg ARM64 dependencies +list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg/installed/arm64-windows") \ No newline at end of file diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake new file mode 100644 index 000000000000..d653339ef156 --- /dev/null +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -0,0 +1,10 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Force Visual Studio generator instead of Ninja for ARM64 +set(VCPKG_CMAKE_GENERATOR "Visual Studio 17 2022") +set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") + +# Explicitly set the platform toolset +set(VCPKG_PLATFORM_TOOLSET v143) \ No newline at end of file diff --git a/platform/windows/windows-arm64-fixup.cmake b/platform/windows/windows-arm64-fixup.cmake new file mode 100644 index 000000000000..8ce336d7c095 --- /dev/null +++ b/platform/windows/windows-arm64-fixup.cmake @@ -0,0 +1,39 @@ +# ARM64 Windows fixup +# This file ensures proper configuration for ARM64 builds + +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + message(STATUS "Applying ARM64 fixups for Windows build") + + set(VCPKG_ARM64_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") + + # Simplify library variables to avoid complex generator expressions + if(TARGET JPEG::JPEG) + set(JPEG_LIBRARIES JPEG::JPEG) + endif() + + if(TARGET PNG::PNG) + set(PNG_LIBRARIES PNG::PNG) + endif() + + # All dependencies are now available via vcpkg for ARM64 + # No special handling needed for libuv anymore + + # Fix ICU::data target which might not exist for ARM64 + if(NOT TARGET ICU::data AND TARGET ICU::uc) + add_library(ICU::data INTERFACE IMPORTED) + endif() + + # All dependencies are available for ARM64, no need to remove any source files + + # Add include directories for missing headers + if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") + include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") + message(STATUS "Using x86 OpenGL headers for ARM64 build") + endif() + + # Link libuv to mbgl-core if it was found + if(LIBUV_FOUND AND (TARGET libuv::uv OR TARGET libuv::uv_a)) + target_link_libraries(mbgl-core PRIVATE $,libuv::uv_a,libuv::uv>) + message(STATUS "Linked libuv to mbgl-core for ARM64") + endif() +endif() \ No newline at end of file diff --git a/platform/windows/windows-arm64-platform.cmake b/platform/windows/windows-arm64-platform.cmake new file mode 100644 index 000000000000..4df056408cfc --- /dev/null +++ b/platform/windows/windows-arm64-platform.cmake @@ -0,0 +1,60 @@ +# Windows ARM64 platform-specific configuration +# This file should be included after the main windows.cmake + +# Override library detection for ARM64 when packages are not available +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") + message(STATUS "Configuring for Windows ARM64") + + # Try to find ARM64 packages first + set(VCPKG_ARM64_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") + + # Check which packages are actually available for ARM64 + if(EXISTS "${VCPKG_ARM64_ROOT}/lib/jpeg.lib") + set(JPEG_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/jpeg.lib") + set(JPEG_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") + else() + message(WARNING "JPEG library not found for ARM64, image loading will be disabled") + set(JPEG_FOUND FALSE) + endif() + + if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libpng16.lib") + set(PNG_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libpng16.lib") + set(PNG_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") + else() + message(WARNING "PNG library not found for ARM64, PNG support will be disabled") + set(PNG_FOUND FALSE) + endif() + + if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libwebp.lib") + set(WEBP_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libwebp.lib") + set(WEBP_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") + else() + message(WARNING "WebP library not found for ARM64, WebP support will be disabled") + set(WEBP_FOUND FALSE) + endif() + + if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libuv.lib") + set(LIBUV_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libuv.lib") + set(LIBUV_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") + else() + message(WARNING "libuv not found for ARM64, async operations may be limited") + set(LIBUV_FOUND FALSE) + endif() + + # Remove source files that depend on unavailable libraries + if(NOT JPEG_FOUND) + list(REMOVE_ITEM mbgl_core_SOURCES + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp) + endif() + + if(NOT PNG_FOUND) + list(REMOVE_ITEM mbgl_core_SOURCES + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp) + endif() + + if(NOT WEBP_FOUND) + list(REMOVE_ITEM mbgl_core_SOURCES + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp) + endif() +endif() \ No newline at end of file diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 24ebae32a7b0..ddbbf8513641 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -11,7 +11,10 @@ if(MSVC) set(WITH_ICU -With-ICU) endif() - execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) + # Skip vcpkg for ARM64 builds as we have manually built dependencies + if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")) + execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) + endif() unset(_RENDERER) add_compile_definitions(NOMINMAX GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE) @@ -25,10 +28,21 @@ if(MSVC) find_package(CURL REQUIRED) find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) - find_package(JPEG REQUIRED) - find_package(libuv REQUIRED) - find_package(PNG REQUIRED) - find_package(WebP REQUIRED) + + # For ARM64, all packages are now available + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + find_package(JPEG REQUIRED) + find_package(libuv REQUIRED) + find_package(PNG REQUIRED) + find_package(WebP REQUIRED) + include(${CMAKE_CURRENT_LIST_DIR}/windows-arm64-fixup.cmake) + else() + find_package(JPEG REQUIRED) + find_package(libuv REQUIRED) + find_package(PNG REQUIRED) + find_package(WebP REQUIRED) + endif() + find_path(DLFCN_INCLUDE_DIRS dlfcn.h) find_path(LIBUV_INCLUDE_DIRS uv.h) elseif(DEFINED ENV{MSYSTEM}) @@ -51,48 +65,59 @@ else() message(FATAL_ERROR "Unsupported build system: " ${CMAKE_SYSTEM_NAME}) endif() +set(MBGL_CORE_SOURCES + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_backend.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_frontend.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/collator.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/number_format.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/layermanager/layer_manager.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/platform/time.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/asset_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/database_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_manager.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_request.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/http_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_request.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/mbtiles_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/main_resource_loader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_database.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_download.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/online_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/$,pmtiles_file_source.cpp,pmtiles_file_source_stub.cpp> + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/sqlite3.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/bidi.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/compression.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/filesystem.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/image.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/logging_stderr.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/monotonic_timer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/string_stdlib.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp + ${PROJECT_SOURCE_DIR}/platform/windows/src/thread.cpp + ${PROJECT_SOURCE_DIR}/platform/windows/src/thread_local.cpp +) + +# Remove sources that depend on unavailable libraries for ARM64 +if(DEFINED MBGL_ARM64_SOURCES_TO_REMOVE) + foreach(src ${MBGL_ARM64_SOURCES_TO_REMOVE}) + list(REMOVE_ITEM MBGL_CORE_SOURCES ${src}) + endforeach() +endif() + target_sources( mbgl-core PRIVATE - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_backend.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_frontend.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/collator.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/number_format.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/layermanager/layer_manager.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/platform/time.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/asset_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/database_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_manager.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_request.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/http_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_request.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/mbtiles_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/main_resource_loader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_database.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_download.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/online_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/$,pmtiles_file_source.cpp,pmtiles_file_source_stub.cpp> - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/sqlite3.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/bidi.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/compression.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/filesystem.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/image.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/logging_stderr.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/monotonic_timer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/string_stdlib.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp - ${PROJECT_SOURCE_DIR}/platform/windows/src/thread.cpp - ${PROJECT_SOURCE_DIR}/platform/windows/src/thread_local.cpp + ${MBGL_CORE_SOURCES} ) target_compile_definitions( @@ -253,7 +278,8 @@ target_link_libraries( $<$>:ICU::uc> $<$>:ICU::data> $<$:$,$,mbgl-vendor-icu>> - PNG::PNG + $<$:PNG::PNG> + $<$>,$>:${PNG_LIBRARIES}> mbgl-vendor-nunicode mbgl-vendor-sqlite ) @@ -266,11 +292,19 @@ endif() if(MLN_WITH_NODE) add_subdirectory(${PROJECT_SOURCE_DIR}/platform/node) elseif(MSVC) - target_link_libraries( - mbgl-core - PRIVATE - $,libuv::uv_a,libuv::uv> - ) + if(TARGET libuv::uv_a OR TARGET libuv::uv) + target_link_libraries( + mbgl-core + PRIVATE + $,libuv::uv_a,libuv::uv> + ) + elseif(LIBUV_LIBRARIES) + target_link_libraries( + mbgl-core + PRIVATE + ${LIBUV_LIBRARIES} + ) + endif() elseif(MSYS) target_link_libraries( mbgl-core @@ -313,11 +347,19 @@ target_link_libraries( ) if(MSVC) - target_link_libraries( - mbgl-test-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) + if(TARGET libuv::uv_a OR TARGET libuv::uv) + target_link_libraries( + mbgl-test-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) + elseif(LIBUV_LIBRARIES) + target_link_libraries( + mbgl-test-runner + PRIVATE + ${LIBUV_LIBRARIES} + ) + endif() endif() add_executable( @@ -333,11 +375,19 @@ target_link_libraries( ) if(MSVC) - target_link_libraries( - mbgl-benchmark-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) + if(TARGET libuv::uv_a OR TARGET libuv::uv) + target_link_libraries( + mbgl-benchmark-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) + elseif(LIBUV_LIBRARIES) + target_link_libraries( + mbgl-benchmark-runner + PRIVATE + ${LIBUV_LIBRARIES} + ) + endif() endif() add_executable( @@ -353,19 +403,35 @@ target_link_libraries( ) if(MSVC) - target_link_libraries( - mbgl-render-test-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) + if(TARGET libuv::uv_a OR TARGET libuv::uv) + target_link_libraries( + mbgl-render-test-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) + elseif(LIBUV_LIBRARIES) + target_link_libraries( + mbgl-render-test-runner + PRIVATE + ${LIBUV_LIBRARIES} + ) + endif() endif() if(MSVC) - target_link_libraries( - mbgl-expression-test - PRIVATE - $,libuv::uv_a,libuv::uv> - ) + if(TARGET libuv::uv_a OR TARGET libuv::uv) + target_link_libraries( + mbgl-expression-test + PRIVATE + $,libuv::uv_a,libuv::uv> + ) + elseif(LIBUV_LIBRARIES) + target_link_libraries( + mbgl-expression-test + PRIVATE + ${LIBUV_LIBRARIES} + ) + endif() endif() # Disable benchmarks in CI as they run in VM environment From 3d32eeeb2623aa5e960cab458a7ee10ef10c056b Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 03:43:04 +0200 Subject: [PATCH 02/96] cleanup --- CMakeCache.txt | 490 ------------------ CMakePresets.json | 2 +- DartConfiguration.tcl | 109 ---- cmake-arm64-config.cmake | 13 - .../windows/arm64-windows-toolchain.cmake | 11 + .../vcpkg-custom-triplets/arm64-windows.cmake | 10 - platform/windows/windows-arm64-platform.cmake | 60 --- 7 files changed, 12 insertions(+), 683 deletions(-) delete mode 100644 CMakeCache.txt delete mode 100644 DartConfiguration.tcl delete mode 100644 cmake-arm64-config.cmake create mode 100644 platform/windows/arm64-windows-toolchain.cmake delete mode 100644 platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake delete mode 100644 platform/windows/windows-arm64-platform.cmake diff --git a/CMakeCache.txt b/CMakeCache.txt deleted file mode 100644 index 4901830a101f..000000000000 --- a/CMakeCache.txt +++ /dev/null @@ -1,490 +0,0 @@ -# This is the CMakeCache file. -# For build in directory: c:/Users/birks/source/repos/maplibre-native-cleanup -# It was generated by CMake: C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe -# You can edit this file to change values found and used by cmake. -# If you do not want to change any of the values, simply exit the editor. -# If you do want to change a value, simply edit, save, and exit the editor. -# The syntax for the file is as follows: -# KEY:TYPE=VALUE -# KEY is the name of a variable in the cache. -# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. -# VALUE is the current value for the KEY. - -######################## -# EXTERNAL cache entries -######################## - -//Build the testing tree. -BUILD_TESTING:BOOL=ON - -//Path to a program. -CMAKE_AR:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/lib.exe - -//Semicolon separated list of supported configuration types, only -// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything -// else will be ignored. -CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo - -//Flags used by the CXX compiler during all build types. -CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /EHsc - -//Flags used by the CXX compiler during DEBUG builds. -CMAKE_CXX_FLAGS_DEBUG:STRING=/Zi /Ob0 /Od /RTC1 - -//Flags used by the CXX compiler during MINSIZEREL builds. -CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG - -//Flags used by the CXX compiler during RELEASE builds. -CMAKE_CXX_FLAGS_RELEASE:STRING=/O2 /Ob2 /DNDEBUG - -//Flags used by the CXX compiler during RELWITHDEBINFO builds. -CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG - -//Libraries linked by default with all C++ applications. -CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib - -//Flags used by the C compiler during all build types. -CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS - -//Flags used by the C compiler during DEBUG builds. -CMAKE_C_FLAGS_DEBUG:STRING=/Zi /Ob0 /Od /RTC1 - -//Flags used by the C compiler during MINSIZEREL builds. -CMAKE_C_FLAGS_MINSIZEREL:STRING=/O1 /Ob1 /DNDEBUG - -//Flags used by the C compiler during RELEASE builds. -CMAKE_C_FLAGS_RELEASE:STRING=/O2 /Ob2 /DNDEBUG - -//Flags used by the C compiler during RELWITHDEBINFO builds. -CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/Zi /O2 /Ob1 /DNDEBUG - -//Libraries linked by default with all C applications. -CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib - -//Flags used by the linker during all build types. -CMAKE_EXE_LINKER_FLAGS:STRING=/machine:ARM64 - -//Flags used by the linker during DEBUG builds. -CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during MINSIZEREL builds. -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during RELEASE builds. -CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during RELWITHDEBINFO builds. -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//Value Computed by CMake. -CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/CMakeFiles/pkgRedirects - -//Install path prefix, prepended onto install directories. -CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/MapLibre Native - -//Path to a program. -CMAKE_LINKER:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/link.exe - -//Flags used by the linker during the creation of modules during -// all build types. -CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:ARM64 - -//Flags used by the linker during the creation of modules during -// DEBUG builds. -CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during the creation of modules during -// MINSIZEREL builds. -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of modules during -// RELEASE builds. -CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of modules during -// RELWITHDEBINFO builds. -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//Path to a program. -CMAKE_MT:FILEPATH=C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/mt.exe - -//Value Computed by CMake -CMAKE_PROJECT_DESCRIPTION:STATIC= - -//Value Computed by CMake -CMAKE_PROJECT_HOMEPAGE_URL:STATIC= - -//Value Computed by CMake -CMAKE_PROJECT_NAME:STATIC=MapLibre Native - -//RC compiler -CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/rc.exe - -//Flags for Windows Resource Compiler during all build types. -CMAKE_RC_FLAGS:STRING=-DWIN32 - -//Flags for Windows Resource Compiler during DEBUG builds. -CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG - -//Flags for Windows Resource Compiler during MINSIZEREL builds. -CMAKE_RC_FLAGS_MINSIZEREL:STRING= - -//Flags for Windows Resource Compiler during RELEASE builds. -CMAKE_RC_FLAGS_RELEASE:STRING= - -//Flags for Windows Resource Compiler during RELWITHDEBINFO builds. -CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= - -//Flags used by the linker during the creation of shared libraries -// during all build types. -CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:ARM64 - -//Flags used by the linker during the creation of shared libraries -// during DEBUG builds. -CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL - -//Flags used by the linker during the creation of shared libraries -// during MINSIZEREL builds. -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of shared libraries -// during RELEASE builds. -CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO - -//Flags used by the linker during the creation of shared libraries -// during RELWITHDEBINFO builds. -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL - -//If set, runtime paths are not added when installing shared libraries, -// but are added when building. -CMAKE_SKIP_INSTALL_RPATH:BOOL=NO - -//If set, runtime paths are not added when using shared libraries. -CMAKE_SKIP_RPATH:BOOL=NO - -//Flags used by the linker during the creation of static libraries -// during all build types. -CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:ARM64 - -//Flags used by the linker during the creation of static libraries -// during DEBUG builds. -CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during the creation of static libraries -// during MINSIZEREL builds. -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during the creation of static libraries -// during RELEASE builds. -CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during the creation of static libraries -// during RELWITHDEBINFO builds. -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//No help, variable specified on the command line. -CMAKE_SYSTEM_NAME:UNINITIALIZED=Windows - -//No help, variable specified on the command line. -CMAKE_TOOLCHAIN_FILE:UNINITIALIZED=C:/Users/birks/source/repos/maplibre-native-cleanup/cmake-arm64-config.cmake - -//If this value is on, makefiles will be generated without the -// .SILENT directive, and all commands will be echoed to the console -// during the make. This is useful for debugging only. With Visual -// Studio IDE projects all commands are done without /nologo. -CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE - -//Path to the coverage program that CTest uses for performing coverage -// inspection -COVERAGE_COMMAND:FILEPATH=COVERAGE_COMMAND-NOTFOUND - -//Extra command line flags to pass to the coverage tool -COVERAGE_EXTRA_FLAGS:STRING=-l - -//How many times to retry timed-out CTest submissions. -CTEST_SUBMIT_RETRY_COUNT:STRING=3 - -//How long to wait between timed-out CTest submissions. -CTEST_SUBMIT_RETRY_DELAY:STRING=5 - -//Maximum time allowed before CTest will kill the test. -DART_TESTING_TIMEOUT:STRING=1500 - -//Disable support of compressed WOFF2 fonts. -FT_DISABLE_BROTLI:BOOL=ON - -//Disable support of bzip2 compressed fonts. -FT_DISABLE_BZIP2:BOOL=OFF - -//Disable HarfBuzz (used for improving auto-hinting of OpenType -// fonts). -FT_DISABLE_HARFBUZZ:BOOL=OFF - -//Disable support of PNG compressed OpenType embedded bitmaps. -FT_DISABLE_PNG:BOOL=OFF - -//Disable use of system zlib and use internal zlib library instead. -FT_DISABLE_ZLIB:BOOL=ON - -//Enable support for meaningful error descriptions. -FT_ENABLE_ERROR_STRINGS:BOOL=OFF - -//Require support of bzip2 compressed fonts. -FT_REQUIRE_BZIP2:BOOL=OFF - -//Require HarfBuzz for improving auto-hinting of OpenType fonts. -FT_REQUIRE_HARFBUZZ:BOOL=OFF - -//Require support of PNG compressed OpenType embedded bitmaps. -FT_REQUIRE_PNG:BOOL=OFF - -//Path to a program. -GITCOMMAND:FILEPATH=C:/Program Files/Git/clangarm64/bin/git.exe - -//Command to build the project -MAKECOMMAND:STRING="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config "${CTEST_CONFIGURATION_TYPE}" - -//Path to the memory checking command, used for memory error detection. -MEMORYCHECK_COMMAND:FILEPATH=MEMORYCHECK_COMMAND-NOTFOUND - -//File that contains suppressions for the memory checker -MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH= - -//Include depdendencies in static build of core -MLN_CORE_INCLUDE_DEPS:BOOL=OFF - -//Create autoreleasepool in render loop -MLN_CREATE_AUTORELEASEPOOL:BOOL=OFF - -//Use haffbuzz to shape complex text -MLN_TEXT_SHAPING_HARFBUZZ:BOOL=ON - -//Use components in Rust -MLN_USE_RUST:BOOL=OFF - -//Enable Tracy instrumentation -MLN_USE_TRACY:BOOL=OFF - -//Use ankerl dense containers for performance -MLN_USE_UNORDERED_DENSE:BOOL=ON - -//Build with clang-tidy checks enabled -MLN_WITH_CLANG_TIDY:BOOL=OFF - -//Build only the core bits, no platform code -MLN_WITH_CORE_ONLY:BOOL=OFF - -//Enable code coverage collection -MLN_WITH_COVERAGE:BOOL=OFF - -//Build with EGL renderer -MLN_WITH_EGL:BOOL=OFF - -//Set up targets for GLFW platform -MLN_WITH_GLFW:BOOL=ON - -//Build MapLibre Native Node.js bindings -MLN_WITH_NODE:BOOL=OFF - -//Build with OpenGL renderer -MLN_WITH_OPENGL:BOOL=ON - -//Build with PMTiles support -MLN_WITH_PMTILES:BOOL=ON - -//Build MapLibre Native Qt bindings -MLN_WITH_QT:BOOL=OFF - -//Compile with runtime type information -MLN_WITH_RTTI:BOOL=OFF - -//Use [address|thread|undefined] here -MLN_WITH_SANITIZER:BOOL=OFF - -//Build with Vulkan renderer -MLN_WITH_VULKAN:BOOL=OFF - -//Make all compilation warnings errors -MLN_WITH_WERROR:BOOL=ON - -//Value Computed by CMake -MapLibre Native_BINARY_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup - -//Value Computed by CMake -MapLibre Native_IS_TOP_LEVEL:STATIC=ON - -//Value Computed by CMake -MapLibre Native_SOURCE_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup - -//Name of the computer/site where compile is being run -SITE:STRING=LAPTOP-7UCOIEMV - -VCPKG_TARGET_TRIPLET:STRING=arm64-windows - -//Value Computed by CMake -freetype_BINARY_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/vendor/freetype - -//Value Computed by CMake -freetype_IS_TOP_LEVEL:STATIC=OFF - -//Value Computed by CMake -freetype_SOURCE_DIR:STATIC=C:/Users/birks/source/repos/maplibre-native-cleanup/vendor/freetype - - -######################## -# INTERNAL cache entries -######################## - -//ADVANCED property for variable: CMAKE_AR -CMAKE_AR-ADVANCED:INTERNAL=1 -//This is the directory where this CMakeCache.txt was created -CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/birks/source/repos/maplibre-native-cleanup -//Major version of cmake used to create the current loaded cache -CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 -//Minor version of cmake used to create the current loaded cache -CMAKE_CACHE_MINOR_VERSION:INTERNAL=31 -//Patch version of cmake used to create the current loaded cache -CMAKE_CACHE_PATCH_VERSION:INTERNAL=6 -//Path to CMake executable. -CMAKE_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe -//Path to cpack program executable. -CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe -//ADVANCED property for variable: CMAKE_CTEST_COMMAND -CMAKE_CTEST_COMMAND-ADVANCED:INTERNAL=1 -//Path to ctest program executable. -CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe -//ADVANCED property for variable: CMAKE_CXX_FLAGS -CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG -CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL -CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE -CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO -CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES -CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS -CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG -CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL -CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE -CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO -CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES -CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1 -//Executable file format -CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS -CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG -CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE -CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Name of external makefile project generator. -CMAKE_EXTRA_GENERATOR:INTERNAL= -//Name of generator. -CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022 -//Generator instance identifier. -CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community -//Name of generator platform. -CMAKE_GENERATOR_PLATFORM:INTERNAL=ARM64 -//Name of generator toolset. -CMAKE_GENERATOR_TOOLSET:INTERNAL= -//Source directory with the top level CMakeLists.txt file for this -// project -CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/birks/source/repos/maplibre-native-cleanup -//ADVANCED property for variable: CMAKE_LINKER -CMAKE_LINKER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS -CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG -CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE -CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MT -CMAKE_MT-ADVANCED:INTERNAL=1 -//number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 -//Platform information initialized -CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 -//noop for ranlib -CMAKE_RANLIB:INTERNAL=: -//ADVANCED property for variable: CMAKE_RC_COMPILER -CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1 -CMAKE_RC_COMPILER_WORKS:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS -CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG -CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL -CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE -CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO -CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Path to CMake installation. -CMAKE_ROOT:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.31 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS -CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG -CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE -CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH -CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_RPATH -CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS -CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG -CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE -CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE -CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: COVERAGE_COMMAND -COVERAGE_COMMAND-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: COVERAGE_EXTRA_FLAGS -COVERAGE_EXTRA_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CTEST_SUBMIT_RETRY_COUNT -CTEST_SUBMIT_RETRY_COUNT-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CTEST_SUBMIT_RETRY_DELAY -CTEST_SUBMIT_RETRY_DELAY-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: DART_TESTING_TIMEOUT -DART_TESTING_TIMEOUT-ADVANCED:INTERNAL=1 -//Require support of compressed WOFF2 fonts. -FT_REQUIRE_BROTLI:INTERNAL=OFF -//Require system zlib instead of internal zlib library. -FT_REQUIRE_ZLIB:INTERNAL=OFF -//ADVANCED property for variable: GITCOMMAND -GITCOMMAND-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: MAKECOMMAND -MAKECOMMAND-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: MEMORYCHECK_COMMAND -MEMORYCHECK_COMMAND-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: MEMORYCHECK_SUPPRESSIONS_FILE -MEMORYCHECK_SUPPRESSIONS_FILE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: SITE -SITE-ADVANCED:INTERNAL=1 - diff --git a/CMakePresets.json b/CMakePresets.json index 7f316b6d689f..fbbb888111b8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -19,7 +19,7 @@ "MLN_WITH_OPENGL": "OFF", "MLN_WITH_EGL": "OFF", "MLN_WITH_VULKAN": "OFF", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake-arm64-config.cmake", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake", "MLN_WITH_GLFW": "OFF" } }, diff --git a/DartConfiguration.tcl b/DartConfiguration.tcl deleted file mode 100644 index 098e8fedb850..000000000000 --- a/DartConfiguration.tcl +++ /dev/null @@ -1,109 +0,0 @@ -# This file is configured by CMake automatically as DartConfiguration.tcl -# If you choose not to use CMake, this file may be hand configured, by -# filling in the required variables. - - -# Configuration directories and files -SourceDirectory: C:/Users/birks/source/repos/maplibre-native-cleanup -BuildDirectory: C:/Users/birks/source/repos/maplibre-native-cleanup - -# Where to place the cost data store -CostDataFile: - -# Site is something like machine.domain, i.e. pragmatic.crd -Site: LAPTOP-7UCOIEMV - -# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ -BuildName: Win32-MSBuild - -# Subprojects -LabelsForSubprojects: - -# Submission information -SubmitURL: http:// -SubmitInactivityTimeout: - -# Dashboard start time -NightlyStartTime: 00:00:00 EDT - -# Commands for the build/test/submit cycle -ConfigureCommand: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" "C:/Users/birks/source/repos/maplibre-native-cleanup" -MakeCommand: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config "${CTEST_CONFIGURATION_TYPE}" -DefaultCTestConfigurationType: Release - -# version control -UpdateVersionOnly: - -# CVS options -# Default is "-d -P -A" -CVSCommand: -CVSUpdateOptions: - -# Subversion options -SVNCommand: -SVNOptions: -SVNUpdateOptions: - -# Git options -GITCommand: C:/Program Files/Git/clangarm64/bin/git.exe -GITInitSubmodules: -GITUpdateOptions: -GITUpdateCustom: - -# Perforce options -P4Command: -P4Client: -P4Options: -P4UpdateOptions: -P4UpdateCustom: - -# Generic update command -UpdateCommand: C:/Program Files/Git/clangarm64/bin/git.exe -UpdateOptions: -UpdateType: git - -# Compiler info -Compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostarm64/arm64/cl.exe -CompilerVersion: 19.44.35213.0 - -# Dynamic analysis (MemCheck) -PurifyCommand: -ValgrindCommand: -ValgrindCommandOptions: -DrMemoryCommand: -DrMemoryCommandOptions: -CudaSanitizerCommand: -CudaSanitizerCommandOptions: -MemoryCheckType: -MemoryCheckSanitizerOptions: -MemoryCheckCommand: MEMORYCHECK_COMMAND-NOTFOUND -MemoryCheckCommandOptions: --leak-check=full --gen-suppressions=all --error-exitcode=1 --suppressions=C:/Users/birks/source/repos/maplibre-native-cleanup/scripts/valgrind.sup -MemoryCheckSuppressionFile: - -# Coverage -CoverageCommand: COVERAGE_COMMAND-NOTFOUND -CoverageExtraFlags: -l - -# Testing options -# TimeOut is the amount of time in seconds to wait for processes -# to complete during testing. After TimeOut seconds, the -# process will be summarily terminated. -# Currently set to 25 minutes -TimeOut: 1500 - -# During parallel testing CTest will not start a new test if doing -# so would cause the system load to exceed this value. -TestLoad: - -TLSVerify: -TLSVersion: - -UseLaunchers: 0 -CurlOptions: -# warning, if you add new options here that have to do with submit, -# you have to update cmCTestSubmitCommand.cxx - -# For CTest submissions that timeout, these options -# specify behavior for retrying the submission -CTestSubmitRetryDelay: 5 -CTestSubmitRetryCount: 3 diff --git a/cmake-arm64-config.cmake b/cmake-arm64-config.cmake deleted file mode 100644 index f2a303e749f8..000000000000 --- a/cmake-arm64-config.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# ARM64 Windows configuration for MapLibre Native - -# Set vcpkg for ARM64 -set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "") -set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg-custom-triplets) - -# Include vcpkg toolchain -if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) - set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") -endif() - -# Add path to vcpkg ARM64 dependencies -list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/platform/windows/vendor/vcpkg/installed/arm64-windows") \ No newline at end of file diff --git a/platform/windows/arm64-windows-toolchain.cmake b/platform/windows/arm64-windows-toolchain.cmake new file mode 100644 index 000000000000..756d985dcd84 --- /dev/null +++ b/platform/windows/arm64-windows-toolchain.cmake @@ -0,0 +1,11 @@ +# ARM64 Windows toolchain for MapLibre Native + +# Set vcpkg for ARM64 +set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "") +set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg-custom-triplets) + +# Add path to vcpkg ARM64 dependencies +list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") + +# Include the base vcpkg toolchain +include(${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake) \ No newline at end of file diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake deleted file mode 100644 index d653339ef156..000000000000 --- a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) - -# Force Visual Studio generator instead of Ninja for ARM64 -set(VCPKG_CMAKE_GENERATOR "Visual Studio 17 2022") -set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") - -# Explicitly set the platform toolset -set(VCPKG_PLATFORM_TOOLSET v143) \ No newline at end of file diff --git a/platform/windows/windows-arm64-platform.cmake b/platform/windows/windows-arm64-platform.cmake deleted file mode 100644 index 4df056408cfc..000000000000 --- a/platform/windows/windows-arm64-platform.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# Windows ARM64 platform-specific configuration -# This file should be included after the main windows.cmake - -# Override library detection for ARM64 when packages are not available -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") - message(STATUS "Configuring for Windows ARM64") - - # Try to find ARM64 packages first - set(VCPKG_ARM64_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") - - # Check which packages are actually available for ARM64 - if(EXISTS "${VCPKG_ARM64_ROOT}/lib/jpeg.lib") - set(JPEG_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/jpeg.lib") - set(JPEG_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") - else() - message(WARNING "JPEG library not found for ARM64, image loading will be disabled") - set(JPEG_FOUND FALSE) - endif() - - if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libpng16.lib") - set(PNG_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libpng16.lib") - set(PNG_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") - else() - message(WARNING "PNG library not found for ARM64, PNG support will be disabled") - set(PNG_FOUND FALSE) - endif() - - if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libwebp.lib") - set(WEBP_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libwebp.lib") - set(WEBP_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") - else() - message(WARNING "WebP library not found for ARM64, WebP support will be disabled") - set(WEBP_FOUND FALSE) - endif() - - if(EXISTS "${VCPKG_ARM64_ROOT}/lib/libuv.lib") - set(LIBUV_LIBRARIES "${VCPKG_ARM64_ROOT}/lib/libuv.lib") - set(LIBUV_INCLUDE_DIRS "${VCPKG_ARM64_ROOT}/include") - else() - message(WARNING "libuv not found for ARM64, async operations may be limited") - set(LIBUV_FOUND FALSE) - endif() - - # Remove source files that depend on unavailable libraries - if(NOT JPEG_FOUND) - list(REMOVE_ITEM mbgl_core_SOURCES - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp) - endif() - - if(NOT PNG_FOUND) - list(REMOVE_ITEM mbgl_core_SOURCES - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp) - endif() - - if(NOT WEBP_FOUND) - list(REMOVE_ITEM mbgl_core_SOURCES - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp) - endif() -endif() \ No newline at end of file From 19f9c16018238bab494a9116fe4ecc02776851f4 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 03:45:15 +0200 Subject: [PATCH 03/96] remove fixup --- platform/windows/windows-arm64-fixup.cmake | 39 ---------------------- platform/windows/windows.cmake | 22 ++++++------ 2 files changed, 10 insertions(+), 51 deletions(-) delete mode 100644 platform/windows/windows-arm64-fixup.cmake diff --git a/platform/windows/windows-arm64-fixup.cmake b/platform/windows/windows-arm64-fixup.cmake deleted file mode 100644 index 8ce336d7c095..000000000000 --- a/platform/windows/windows-arm64-fixup.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# ARM64 Windows fixup -# This file ensures proper configuration for ARM64 builds - -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") - message(STATUS "Applying ARM64 fixups for Windows build") - - set(VCPKG_ARM64_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") - - # Simplify library variables to avoid complex generator expressions - if(TARGET JPEG::JPEG) - set(JPEG_LIBRARIES JPEG::JPEG) - endif() - - if(TARGET PNG::PNG) - set(PNG_LIBRARIES PNG::PNG) - endif() - - # All dependencies are now available via vcpkg for ARM64 - # No special handling needed for libuv anymore - - # Fix ICU::data target which might not exist for ARM64 - if(NOT TARGET ICU::data AND TARGET ICU::uc) - add_library(ICU::data INTERFACE IMPORTED) - endif() - - # All dependencies are available for ARM64, no need to remove any source files - - # Add include directories for missing headers - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") - include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") - message(STATUS "Using x86 OpenGL headers for ARM64 build") - endif() - - # Link libuv to mbgl-core if it was found - if(LIBUV_FOUND AND (TARGET libuv::uv OR TARGET libuv::uv_a)) - target_link_libraries(mbgl-core PRIVATE $,libuv::uv_a,libuv::uv>) - message(STATUS "Linked libuv to mbgl-core for ARM64") - endif() -endif() \ No newline at end of file diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index ddbbf8513641..22b861f5f6a0 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -29,18 +29,16 @@ if(MSVC) find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) - # For ARM64, all packages are now available - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") - find_package(JPEG REQUIRED) - find_package(libuv REQUIRED) - find_package(PNG REQUIRED) - find_package(WebP REQUIRED) - include(${CMAKE_CURRENT_LIST_DIR}/windows-arm64-fixup.cmake) - else() - find_package(JPEG REQUIRED) - find_package(libuv REQUIRED) - find_package(PNG REQUIRED) - find_package(WebP REQUIRED) + find_package(JPEG REQUIRED) + find_package(libuv REQUIRED) + find_package(PNG REQUIRED) + find_package(WebP REQUIRED) + + # ARM64 specific: Use x86 OpenGL headers if ARM64 headers are missing + if((CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") AND + EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") + include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") + message(STATUS "Using x86 OpenGL headers for ARM64 build") endif() find_path(DLFCN_INCLUDE_DIRS dlfcn.h) From e29c63ebcd04ddfb2ca6232fd8d01645cc9206fb Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 03:47:02 +0200 Subject: [PATCH 04/96] fixes --- platform/windows/windows.cmake | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 22b861f5f6a0..874476c370cf 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -34,11 +34,27 @@ if(MSVC) find_package(PNG REQUIRED) find_package(WebP REQUIRED) - # ARM64 specific: Use x86 OpenGL headers if ARM64 headers are missing - if((CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") AND - EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") - include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") - message(STATUS "Using x86 OpenGL headers for ARM64 build") + # ARM64 specific fixes + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + # Simplify library variables to avoid complex generator expressions + if(TARGET JPEG::JPEG) + set(JPEG_LIBRARIES JPEG::JPEG) + endif() + + if(TARGET PNG::PNG) + set(PNG_LIBRARIES PNG::PNG) + endif() + + # Fix ICU::data target which might not exist for ARM64 + if(NOT TARGET ICU::data AND TARGET ICU::uc) + add_library(ICU::data INTERFACE IMPORTED) + endif() + + # Use x86 OpenGL headers if ARM64 headers are missing + if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") + include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") + message(STATUS "Using x86 OpenGL headers for ARM64 build") + endif() endif() find_path(DLFCN_INCLUDE_DIRS dlfcn.h) From 9b4f689f2fcccf12b9be95217118b50a2a6f7459 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:08:22 +0200 Subject: [PATCH 05/96] cleanup --- CMakePresets.json | 4 ++-- platform/windows/arm64-windows-toolchain.cmake | 10 +++++----- .../vendor/vcpkg-custom-triplets/arm64-windows.cmake | 10 ++++++++++ platform/windows/windows.cmake | 3 ++- 4 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake diff --git a/CMakePresets.json b/CMakePresets.json index fbbb888111b8..28e0b743a0a8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -19,8 +19,8 @@ "MLN_WITH_OPENGL": "OFF", "MLN_WITH_EGL": "OFF", "MLN_WITH_VULKAN": "OFF", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake", - "MLN_WITH_GLFW": "OFF" + "MLN_WITH_GLFW": "OFF", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake" } }, { diff --git a/platform/windows/arm64-windows-toolchain.cmake b/platform/windows/arm64-windows-toolchain.cmake index 756d985dcd84..c6b30a8c4f9e 100644 --- a/platform/windows/arm64-windows-toolchain.cmake +++ b/platform/windows/arm64-windows-toolchain.cmake @@ -1,11 +1,11 @@ -# ARM64 Windows toolchain for MapLibre Native +# Minimal ARM64 Windows toolchain for MapLibre Native # Set vcpkg for ARM64 set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "") set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg-custom-triplets) -# Add path to vcpkg ARM64 dependencies -list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") +# Include the base vcpkg toolchain first +include(${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake) -# Include the base vcpkg toolchain -include(${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake) \ No newline at end of file +# Ensure ARM64 packages are found by adding to CMAKE_PREFIX_PATH after vcpkg toolchain +list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") \ No newline at end of file diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake new file mode 100644 index 000000000000..d653339ef156 --- /dev/null +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -0,0 +1,10 @@ +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Force Visual Studio generator instead of Ninja for ARM64 +set(VCPKG_CMAKE_GENERATOR "Visual Studio 17 2022") +set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") + +# Explicitly set the platform toolset +set(VCPKG_PLATFORM_TOOLSET v143) \ No newline at end of file diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 874476c370cf..f82a3426d133 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -11,7 +11,8 @@ if(MSVC) set(WITH_ICU -With-ICU) endif() - # Skip vcpkg for ARM64 builds as we have manually built dependencies + # Skip Get-VendorPackages.ps1 for ARM64 due to vcpkg compiler detection issues + # The required packages should already be installed if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")) execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) endif() From 90ddba94a571a198d563451f4b042ec090987cdd Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:13:17 +0200 Subject: [PATCH 06/96] add vulkan preset --- CMakePresets.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index 28e0b743a0a8..1d5d1b20ce84 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -33,6 +33,17 @@ "MLN_WITH_OPENGL": "ON", "MLN_WITH_GLFW": "ON" } +}, +{ + "name": "windows-arm64-vulkan", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Vulkan", + "description": "Windows ARM64 build (Vulkan renderer)", + "cacheVariables": { + "MLN_WITH_VULKAN": "ON", + "MLN_WITH_GLFW": "ON" + } }, { "name": "ios", From 778afc8f355ec710728a6ff8c20124de66b9447e Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:30:57 +0200 Subject: [PATCH 07/96] add arm64 build guide --- platform/windows/Windows-ARM64-Build-Guide.md | 272 ++++++++++++++++++ 1 file changed, 272 insertions(+) create mode 100644 platform/windows/Windows-ARM64-Build-Guide.md diff --git a/platform/windows/Windows-ARM64-Build-Guide.md b/platform/windows/Windows-ARM64-Build-Guide.md new file mode 100644 index 000000000000..68f851c40e01 --- /dev/null +++ b/platform/windows/Windows-ARM64-Build-Guide.md @@ -0,0 +1,272 @@ +# Windows ARM64 Build Guide for MapLibre Native + +This guide provides step-by-step instructions for building MapLibre Native on Windows ARM64 systems. + +## Prerequisites + +1. **Visual Studio 2022** with ARM64 build tools + - Install "Desktop development with C++" workload + - Include "MSVC v143 - VS 2022 C++ ARM64 build tools" + +2. **CMake** (3.20 or higher) + - Download from https://cmake.org/download/ + +3. **Git** + - Download from https://git-scm.com/download/win + +4. **Python** (for build scripts) + - Download from https://www.python.org/downloads/ + +## Step 1: Clone the Repository + +```bash +git clone https://github.com/maplibre/maplibre-native.git +cd maplibre-native +git submodule update --init --recursive +``` + +## Step 2: Bootstrap vcpkg and Install Dependencies + +Open a **VS2022 PowerShell for ARM64** and run: + +```powershell +# Navigate to your maplibre-native directory +cd maplibre-native + +# Bootstrap vcpkg if needed +if (!(Test-Path platform\windows\vendor\vcpkg\vcpkg.exe)) { + cd platform\windows\vendor\vcpkg + .\bootstrap-vcpkg.bat -disableMetrics + cd ..\..\..\.. +} + +# Install required dependencies for ARM64 +.\platform\windows\vendor\vcpkg\vcpkg.exe install curl:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libpng:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libjpeg-turbo:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libwebp:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libuv:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install icu:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install glfw3:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install dlfcn-win32:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install zlib:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install egl-registry:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install opengl-registry:arm64-windows + +# Note: If vcpkg fails with compiler detection errors, see troubleshooting section +``` + +### Step 2.1: Copy OpenGL Headers (Required) + +The OpenGL headers are platform-independent and need to be copied from x86: + +```powershell +# Copy GLES3 headers from x86 to ARM64 (if they exist) +if (Test-Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3) { + Copy-Item -Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3 ` + -Destination platform\windows\vendor\vcpkg\installed\arm64-windows\include\ ` + -Recurse -Force +} +``` + +## Step 3: Configure and Build + +You can build MapLibre Native with either OpenGL or Vulkan renderer. The Vulkan renderer provides significantly better performance on ARM64 devices. + +### Option A: Build with OpenGL (Default) + +```powershell +# Clean any previous CMake artifacts: +powershell -Command "Remove-Item -Path CMakeCache.txt, CMakeFiles, DartConfiguration.tcl, build-windows-arm64-opengl -Force -Recurse -ErrorAction SilentlyContinue" + +# Configure the project with explicit build directory +# IMPORTANT: You must explicitly set CMAKE_PREFIX_PATH for ARM64 builds +cmake -S . -B build-windows-arm64-opengl --preset windows-arm64-opengl -DCMAKE_PREFIX_PATH="C:/Users/$env:USERNAME/source/repos/maplibre-native-cleanup/platform/windows/vendor/vcpkg/installed/arm64-windows" + +# Build the core library +cmake --build build-windows-arm64-opengl --config Release --target mbgl-core + +# Build the render executable +cmake --build build-windows-arm64-opengl --config Release --target mbgl-render + +# Build the test runner +cmake --build build-windows-arm64-opengl --config Release --target mbgl-test-runner + +# Build the GLFW example (if you want to test with a GUI) +cmake --build build-windows-arm64-opengl --config Release --target mbgl-glfw +``` + +### Option B: Build with Vulkan (Better Performance) + +```powershell +# Clean any previous CMake artifacts: +powershell -Command "Remove-Item -Path CMakeCache.txt, CMakeFiles, DartConfiguration.tcl, build-windows-arm64-vulkan -Force -Recurse -ErrorAction SilentlyContinue" + +# Configure the project with Vulkan preset +# IMPORTANT: You must explicitly set CMAKE_PREFIX_PATH for ARM64 builds +cmake -S . -B build-windows-arm64-vulkan --preset windows-arm64-vulkan -DCMAKE_PREFIX_PATH="C:/Users/$env:USERNAME/source/repos/maplibre-native-cleanup/platform/windows/vendor/vcpkg/installed/arm64-windows" + +# Build the core library +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-core + +# Build the render executable +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-render + +# Build the test runner +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-test-runner + +# Build the GLFW example (if you want to test with a GUI) +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-glfw +``` + +## Step 4: Copy Required DLLs + +The executables need access to vcpkg DLLs at runtime. Copy them to the output directories: + +### For OpenGL Build: +```powershell +# Copy DLLs for mbgl-render +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\bin\Release\ -Force + +# Copy DLLs for mbgl-test-runner +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\Release\ -Force + +# Copy DLLs for mbgl-glfw +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\platform\glfw\Release\ -Force +``` + +### For Vulkan Build: +```powershell +# Copy DLLs for mbgl-render +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\bin\Release\ -Force + +# Copy DLLs for mbgl-test-runner +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\Release\ -Force + +# Copy DLLs for mbgl-glfw +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\platform\glfw\Release\ -Force +``` + +## Step 5: Test the Build + +Test commands are the same for both OpenGL and Vulkan builds, just adjust the directory path accordingly. + +### Test mbgl-render +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\bin\Release +.\mbgl-render.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json --output test.png + +# For Vulkan: +cd build-windows-arm64-vulkan\bin\Release +.\mbgl-render.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json --output test.png +``` + +### Run Tests +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\Release +.\mbgl-test-runner.exe + +# For Vulkan: +cd build-windows-arm64-vulkan\Release +.\mbgl-test-runner.exe +``` + +### Run GLFW Example +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\platform\glfw\Release +.\mbgl-glfw.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json + +# For Vulkan: +cd build-windows-arm64-vulkan\platform\glfw\Release +.\mbgl-glfw.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json +``` + + +## Build Outputs + +After a successful build, you'll find: +- `mbgl-core.lib` - The core MapLibre library (~107 MB) +- `mbgl-render.exe` - Command-line renderer +- `mbgl-test-runner.exe` - Test suite executable +- `mbgl-glfw.exe` - Interactive map viewer using GLFW + +## Troubleshooting + +### vcpkg warnings about mismatched VCPKG_ROOT +This warning can be safely ignored, or you can unset the VCPKG_ROOT environment variable: +```powershell +$env:VCPKG_ROOT = "" +``` + +### "In-source builds are not permitted" error +This occurs if CMake files were created in the wrong location. Clean up and try again: +```powershell +# From the root directory +Remove-Item -Recurse -Force CMakeCache.txt -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force CMakeFiles -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force vendor\freetype\CMakeCache.txt -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force vendor\freetype\CMakeFiles -ErrorAction SilentlyContinue + +# Then reconfigure with explicit directories +cmake -S . -B build-windows-arm64-opengl --preset windows-arm64-opengl +``` + +### vcpkg fails with "No CMAKE_C_COMPILER could be found" +This is a known vcpkg bug with ARM64. The custom triplet file in `platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake` forces the Visual Studio generator to work around this issue. If you still encounter problems: +1. Ensure you're using the custom triplet by setting `VCPKG_OVERLAY_TRIPLETS` +2. Try using x64 Native Tools Command Prompt instead of ARM64 +3. Copy already-built packages from another installation + +### CMake Error: Could NOT find CURL (or other packages) +This happens when vcpkg packages are installed but CMake can't find them. Solution: +- Always pass `-DCMAKE_PREFIX_PATH` explicitly when configuring for ARM64 +- Use the full path to your vcpkg ARM64 installation directory +- Example: `-DCMAKE_PREFIX_PATH="C:/path/to/maplibre-native/platform/windows/vendor/vcpkg/installed/arm64-windows"` + +### Missing GLES3/gl3.h header +This header is platform-independent. If not installed by vcpkg: +```powershell +# First, install opengl-registry for x86 if not present +.\platform\windows\vendor\vcpkg\vcpkg.exe install opengl-registry:x86-windows + +# Then copy the headers +Copy-Item -Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3 ` + -Destination platform\windows\vendor\vcpkg\installed\arm64-windows\include\ ` + -Recurse -Force +``` + +### CMake Error: Target "mbgl-core" links to ICU::data but the target was not found +This is automatically handled by the ARM64 fixes integrated into `platform/windows/windows.cmake`. + +### Build times out in command line +The mbgl-core build can take 10-15 minutes on ARM64. If using a CI/CD system, increase timeout limits. + +### Executable won't start or exits immediately +This usually means missing DLL dependencies. Make sure you've copied the vcpkg DLLs: +```powershell +# Check what DLLs are required +dumpbin /dependents path\to\your.exe + +# Copy all ARM64 DLLs to the executable's directory +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination path\to\executable\directory\ -Force +``` + +## Known Issues + +### OpenGL Build +- 4 tests fail out of 1001 (TileLOD-related) +- These failures don't affect normal usage + +### Vulkan Build +- Only 1 test fails out of 966 (Map.SetStyleInvalidJSON) +- "Vulkan layers not found" warnings can be ignored (validation layers) From 4ca3390a827f4128eac2b78abf9e3bd75c687237 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:34:23 +0200 Subject: [PATCH 08/96] move windows presets together --- CMakePresets.json | 78 +++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 1d5d1b20ce84..d99c6f4b2166 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -6,45 +6,6 @@ "patch": 0 }, "configurePresets": [ - { - "name": "windows-arm64", - "hidden": true, - "generator": "Visual Studio 17 2022", - "architecture": { - "value": "ARM64", - "strategy": "set" - }, - "cacheVariables": { - "CMAKE_SYSTEM_NAME": "Windows", - "MLN_WITH_OPENGL": "OFF", - "MLN_WITH_EGL": "OFF", - "MLN_WITH_VULKAN": "OFF", - "MLN_WITH_GLFW": "OFF", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake" - } -}, -{ - "name": "windows-arm64-opengl", - "hidden": false, - "inherits": "windows-arm64", - "displayName": "Windows ARM64 OpenGL", - "description": "Windows ARM64 build (OpenGL renderer)", - "cacheVariables": { - "MLN_WITH_OPENGL": "ON", - "MLN_WITH_GLFW": "ON" - } -}, -{ - "name": "windows-arm64-vulkan", - "hidden": false, - "inherits": "windows-arm64", - "displayName": "Windows ARM64 Vulkan", - "description": "Windows ARM64 build (Vulkan renderer)", - "cacheVariables": { - "MLN_WITH_VULKAN": "ON", - "MLN_WITH_GLFW": "ON" - } -}, { "name": "ios", "displayName": "iOS", @@ -219,6 +180,45 @@ "MLN_CORE_INCLUDE_DEPS": "ON", "MLN_USE_BUILTIN_ICU": "ON" } + }, + { + "name": "windows-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_OPENGL": "OFF", + "MLN_WITH_EGL": "OFF", + "MLN_WITH_VULKAN": "OFF", + "MLN_WITH_GLFW": "OFF", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake" + } + }, + { + "name": "windows-arm64-opengl", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 OpenGL", + "description": "Windows ARM64 build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_OPENGL": "ON", + "MLN_WITH_GLFW": "ON" + } + }, + { + "name": "windows-arm64-vulkan", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Vulkan", + "description": "Windows ARM64 build (Vulkan renderer)", + "cacheVariables": { + "MLN_WITH_VULKAN": "ON", + "MLN_WITH_GLFW": "ON" + } } ], "buildPresets": [ From a117488fc4a65a629fae2f6c785b0c68d1a125d6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 02:40:07 +0000 Subject: [PATCH 09/96] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- platform/windows/Windows-ARM64-Build-Guide.md | 2 +- platform/windows/arm64-windows-toolchain.cmake | 2 +- .../vendor/vcpkg-custom-triplets/arm64-windows.cmake | 2 +- platform/windows/windows.cmake | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/platform/windows/Windows-ARM64-Build-Guide.md b/platform/windows/Windows-ARM64-Build-Guide.md index 68f851c40e01..bef75abf8d13 100644 --- a/platform/windows/Windows-ARM64-Build-Guide.md +++ b/platform/windows/Windows-ARM64-Build-Guide.md @@ -267,6 +267,6 @@ Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll - 4 tests fail out of 1001 (TileLOD-related) - These failures don't affect normal usage -### Vulkan Build +### Vulkan Build - Only 1 test fails out of 966 (Map.SetStyleInvalidJSON) - "Vulkan layers not found" warnings can be ignored (validation layers) diff --git a/platform/windows/arm64-windows-toolchain.cmake b/platform/windows/arm64-windows-toolchain.cmake index c6b30a8c4f9e..dbdffaf806d0 100644 --- a/platform/windows/arm64-windows-toolchain.cmake +++ b/platform/windows/arm64-windows-toolchain.cmake @@ -8,4 +8,4 @@ set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg-custom-triplet include(${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake) # Ensure ARM64 packages are found by adding to CMAKE_PREFIX_PATH after vcpkg toolchain -list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") \ No newline at end of file +list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake index d653339ef156..d19f3d0c1749 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -7,4 +7,4 @@ set(VCPKG_CMAKE_GENERATOR "Visual Studio 17 2022") set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") # Explicitly set the platform toolset -set(VCPKG_PLATFORM_TOOLSET v143) \ No newline at end of file +set(VCPKG_PLATFORM_TOOLSET v143) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index f82a3426d133..b5fb15a0d21a 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -29,35 +29,35 @@ if(MSVC) find_package(CURL REQUIRED) find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) - + find_package(JPEG REQUIRED) find_package(libuv REQUIRED) find_package(PNG REQUIRED) find_package(WebP REQUIRED) - + # ARM64 specific fixes if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") # Simplify library variables to avoid complex generator expressions if(TARGET JPEG::JPEG) set(JPEG_LIBRARIES JPEG::JPEG) endif() - + if(TARGET PNG::PNG) set(PNG_LIBRARIES PNG::PNG) endif() - + # Fix ICU::data target which might not exist for ARM64 if(NOT TARGET ICU::data AND TARGET ICU::uc) add_library(ICU::data INTERFACE IMPORTED) endif() - + # Use x86 OpenGL headers if ARM64 headers are missing if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") message(STATUS "Using x86 OpenGL headers for ARM64 build") endif() endif() - + find_path(DLFCN_INCLUDE_DIRS dlfcn.h) find_path(LIBUV_INCLUDE_DIRS uv.h) elseif(DEFINED ENV{MSYSTEM}) From c35dcdf9c182c318f9bd788bfad9b26eed6d8acc Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:44:47 +0200 Subject: [PATCH 10/96] cleanup windows.cmake --- platform/windows/windows.cmake | 189 ++++++++++++--------------------- 1 file changed, 68 insertions(+), 121 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index b5fb15a0d21a..2c2f8a205755 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -29,7 +29,6 @@ if(MSVC) find_package(CURL REQUIRED) find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) - find_package(JPEG REQUIRED) find_package(libuv REQUIRED) find_package(PNG REQUIRED) @@ -80,59 +79,48 @@ else() message(FATAL_ERROR "Unsupported build system: " ${CMAKE_SYSTEM_NAME}) endif() -set(MBGL_CORE_SOURCES - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_backend.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_frontend.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/collator.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/number_format.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/layermanager/layer_manager.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/platform/time.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/asset_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/database_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_manager.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_request.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/http_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_request.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/mbtiles_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/main_resource_loader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_database.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_download.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/online_file_source.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/$,pmtiles_file_source.cpp,pmtiles_file_source_stub.cpp> - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/sqlite3.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/bidi.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/compression.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/filesystem.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/image.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/logging_stderr.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/monotonic_timer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/string_stdlib.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp - ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp - ${PROJECT_SOURCE_DIR}/platform/windows/src/thread.cpp - ${PROJECT_SOURCE_DIR}/platform/windows/src/thread_local.cpp -) - -# Remove sources that depend on unavailable libraries for ARM64 -if(DEFINED MBGL_ARM64_SOURCES_TO_REMOVE) - foreach(src ${MBGL_ARM64_SOURCES_TO_REMOVE}) - list(REMOVE_ITEM MBGL_CORE_SOURCES ${src}) - endforeach() -endif() - target_sources( mbgl-core PRIVATE - ${MBGL_CORE_SOURCES} + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_backend.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/gfx/headless_frontend.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/collator.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/i18n/number_format.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/layermanager/layer_manager.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/platform/time.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/asset_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/database_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_manager.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/file_source_request.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/http_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_request.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/local_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/mbtiles_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/main_resource_loader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_database.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/offline_download.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/online_file_source.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/$,pmtiles_file_source.cpp,pmtiles_file_source_stub.cpp> + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/storage/sqlite3.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/bidi.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/text/local_glyph_rasterizer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/async_task.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/compression.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/filesystem.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/image.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/jpeg_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/webp_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/logging_stderr.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/monotonic_timer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_reader.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/png_writer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/run_loop.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/string_stdlib.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/timer.cpp + ${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp + ${PROJECT_SOURCE_DIR}/platform/windows/src/thread.cpp + ${PROJECT_SOURCE_DIR}/platform/windows/src/thread_local.cpp ) target_compile_definitions( @@ -227,7 +215,7 @@ target_include_directories( PRIVATE ${PROJECT_SOURCE_DIR}/platform/windows/include ${CURL_INCLUDE_DIRS} - ${DLFCN_INCLUDE_DIRS} + ${DLFCN_INCLUDE_DIRS} ${JPEG_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS} ${WEBP_INCLUDE_DIRS} @@ -274,7 +262,7 @@ if(MSVC) mbgl-core PRIVATE ${CURL_LIBRARIES} - dlfcn-win32::dl + dlfcn-win32::dl ) elseif(MSYS) target_link_libraries( @@ -293,8 +281,7 @@ target_link_libraries( $<$>:ICU::uc> $<$>:ICU::data> $<$:$,$,mbgl-vendor-icu>> - $<$:PNG::PNG> - $<$>,$>:${PNG_LIBRARIES}> + PNG::PNG mbgl-vendor-nunicode mbgl-vendor-sqlite ) @@ -307,19 +294,11 @@ endif() if(MLN_WITH_NODE) add_subdirectory(${PROJECT_SOURCE_DIR}/platform/node) elseif(MSVC) - if(TARGET libuv::uv_a OR TARGET libuv::uv) - target_link_libraries( - mbgl-core - PRIVATE - $,libuv::uv_a,libuv::uv> - ) - elseif(LIBUV_LIBRARIES) - target_link_libraries( - mbgl-core - PRIVATE - ${LIBUV_LIBRARIES} - ) - endif() + target_link_libraries( + mbgl-core + PRIVATE + $,libuv::uv_a,libuv::uv> + ) elseif(MSYS) target_link_libraries( mbgl-core @@ -362,19 +341,11 @@ target_link_libraries( ) if(MSVC) - if(TARGET libuv::uv_a OR TARGET libuv::uv) - target_link_libraries( - mbgl-test-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) - elseif(LIBUV_LIBRARIES) - target_link_libraries( - mbgl-test-runner - PRIVATE - ${LIBUV_LIBRARIES} - ) - endif() + target_link_libraries( + mbgl-test-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) endif() add_executable( @@ -390,19 +361,11 @@ target_link_libraries( ) if(MSVC) - if(TARGET libuv::uv_a OR TARGET libuv::uv) - target_link_libraries( - mbgl-benchmark-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) - elseif(LIBUV_LIBRARIES) - target_link_libraries( - mbgl-benchmark-runner - PRIVATE - ${LIBUV_LIBRARIES} - ) - endif() + target_link_libraries( + mbgl-benchmark-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) endif() add_executable( @@ -418,35 +381,19 @@ target_link_libraries( ) if(MSVC) - if(TARGET libuv::uv_a OR TARGET libuv::uv) - target_link_libraries( - mbgl-render-test-runner - PRIVATE - $,libuv::uv_a,libuv::uv> - ) - elseif(LIBUV_LIBRARIES) - target_link_libraries( - mbgl-render-test-runner - PRIVATE - ${LIBUV_LIBRARIES} - ) - endif() + target_link_libraries( + mbgl-render-test-runner + PRIVATE + $,libuv::uv_a,libuv::uv> + ) endif() if(MSVC) - if(TARGET libuv::uv_a OR TARGET libuv::uv) - target_link_libraries( - mbgl-expression-test - PRIVATE - $,libuv::uv_a,libuv::uv> - ) - elseif(LIBUV_LIBRARIES) - target_link_libraries( - mbgl-expression-test - PRIVATE - ${LIBUV_LIBRARIES} - ) - endif() + target_link_libraries( + mbgl-expression-test + PRIVATE + $,libuv::uv_a,libuv::uv> + ) endif() # Disable benchmarks in CI as they run in VM environment @@ -455,4 +402,4 @@ if(NOT DEFINED ENV{CI}) endif() add_test(NAME mbgl-test-runner COMMAND mbgl-test-runner WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -install(TARGETS mbgl-render-test-runner RUNTIME DESTINATION bin) +install(TARGETS mbgl-render-test-runner RUNTIME DESTINATION bin) \ No newline at end of file From 8ad6c8fa5b9d267e83e11fe52f17e683b7950161 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 02:46:34 +0000 Subject: [PATCH 11/96] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- platform/windows/windows.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 2c2f8a205755..7487611ddf29 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -402,4 +402,4 @@ if(NOT DEFINED ENV{CI}) endif() add_test(NAME mbgl-test-runner COMMAND mbgl-test-runner WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -install(TARGETS mbgl-render-test-runner RUNTIME DESTINATION bin) \ No newline at end of file +install(TARGETS mbgl-render-test-runner RUNTIME DESTINATION bin) From a5f3e1121d0c61c32087c06763a0de96408ce2a7 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 04:48:40 +0200 Subject: [PATCH 12/96] move build guide eto docs --- .../mdbook/src/platforms/windows/build-msvc-arm64.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename platform/windows/Windows-ARM64-Build-Guide.md => docs/mdbook/src/platforms/windows/build-msvc-arm64.md (99%) diff --git a/platform/windows/Windows-ARM64-Build-Guide.md b/docs/mdbook/src/platforms/windows/build-msvc-arm64.md similarity index 99% rename from platform/windows/Windows-ARM64-Build-Guide.md rename to docs/mdbook/src/platforms/windows/build-msvc-arm64.md index bef75abf8d13..2a204468d290 100644 --- a/platform/windows/Windows-ARM64-Build-Guide.md +++ b/docs/mdbook/src/platforms/windows/build-msvc-arm64.md @@ -1,4 +1,4 @@ -# Windows ARM64 Build Guide for MapLibre Native +# Build Windows ARM64 with MSCV for MapLibre Native This guide provides step-by-step instructions for building MapLibre Native on Windows ARM64 systems. From b4c1dc1994187cf6e24e44b273da405dfe78c4c9 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 13:12:17 +0200 Subject: [PATCH 13/96] add msvc arm64 runner for opengl/vulkan --- .github/workflows/windows-ci.yml | 42 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 421a130d5a59..7353a4eb90da 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -109,12 +109,29 @@ jobs: needs: windows-get-or-build-dependencies strategy: matrix: - renderer: [opengl, egl, vulkan] - runs-on: windows-2022 + include: + - renderer: opengl + runner: windows-2022 + - renderer: egl + runner: windows-2022 + - renderer: vulkan + runner: windows-2022 + - renderer: opengl + runner: windows-11-arm64 + arch: arm64 + - renderer: vulkan + runner: windows-11-arm64 + arch: arm64 + runs-on: ${{ matrix.runner }} steps: - run: | git config --system core.longpaths true + - name: Set build directory + run: | + $buildDir = if ("${{ matrix.arch }}" -eq "arm64") { "build-windows-arm64-${{ matrix.renderer }}" } else { "build-windows-${{ matrix.renderer }}" } + Add-Content -Path $env:GITHUB_ENV -Value "BUILD_DIR=$buildDir" + - uses: actions/checkout@v4 with: submodules: recursive @@ -154,11 +171,12 @@ jobs: timeout-minutes: 60 run: | cmake --version - cmake --preset windows-${{ matrix.renderer }} -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded -DCMAKE_BUILD_TYPE=RelWithDebInfo + $preset = if ("${{ matrix.arch }}" -eq "arm64") { "windows-arm64-${{ matrix.renderer }}" } else { "windows-${{ matrix.renderer }}" } + cmake --preset $preset -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded -DCMAKE_BUILD_TYPE=RelWithDebInfo ${{ matrix.arch == 'arm64' && '-DCMAKE_PREFIX_PATH="${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\installed\\arm64-windows"' || '' }} - name: Build MapLibre Native Core run: | - cmake --build build-windows-${{ matrix.renderer }} --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test mbgl-render mbgl-benchmark-runner + cmake --build $env:BUILD_DIR --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test mbgl-render mbgl-benchmark-runner # CodeQL @@ -174,19 +192,19 @@ jobs: - name: Extract Mesa3D files for OpenGL if: matrix.renderer != 'vulkan' run: | - & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} .\mesa3d.7z x64\libgallium_wgl.dll x64\libGLESv2.dll + & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR .\mesa3d.7z x64\libgallium_wgl.dll x64\libGLESv2.dll - name: Extract Mesa3D files for Vulkan if: matrix.renderer == 'vulkan' run: | - & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} .\mesa3d.7z x64\lvp_icd.x86_64.json x64\vulkan_lvp.dll + & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR .\mesa3d.7z x64\lvp_icd.x86_64.json x64\vulkan_lvp.dll # unit tests - name: Configure Mesa3D drivers (OpenGL) if: matrix.renderer != 'vulkan' run: | - reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DLL /t REG_SZ /d ('{0}\build-windows-${{ matrix.renderer }}\libgallium_wgl.dll' -f $PWD.Path) /f + reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DLL /t REG_SZ /d ('{0}\{1}\libgallium_wgl.dll' -f $PWD.Path, $env:BUILD_DIR) /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DriverVersion /t REG_DWORD /d 1 /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v Flags /t REG_DWORD /d 1 /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v Version /t REG_DWORD /d 2 /f @@ -195,7 +213,7 @@ jobs: - name: Configure Mesa3D drivers (Vulkan) if: matrix.renderer == 'vulkan' run: | - reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v '${{ github.workspace }}\build-windows-${{ matrix.renderer }}\lvp_icd.x86_64.json' /t REG_DWORD /d 0 + reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v "${{ github.workspace }}\$($env:BUILD_DIR)\lvp_icd.x86_64.json" /t REG_DWORD /d 0 - name: Download and configure Vulkan if: matrix.renderer == 'vulkan' @@ -204,7 +222,7 @@ jobs: # $version = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows $version = '1.4.313.0' Invoke-WebRequest https://sdk.lunarg.com/sdk/download/$version/windows/VulkanRT-X64-$version-Components.zip -OutFile VulkanRT.zip - & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} -r .\VulkanRT.zip *x64\vulkan-1.* + & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR -r .\VulkanRT.zip *x64\vulkan-1.* - name: Run C++ tests continue-on-error: ${{ matrix.renderer == 'vulkan' }} @@ -212,7 +230,7 @@ jobs: ANGLE_DEFAULT_PLATFORM: 'gl' GALLIUM_DRIVER: llvmpipe LIBGL_ALWAYS_SOFTWARE: true - run: build-windows-${{ matrix.renderer }}/mbgl-test-runner.exe + run: $env:BUILD_DIR/mbgl-test-runner.exe # render tests @@ -223,7 +241,7 @@ jobs: ANGLE_DEFAULT_PLATFORM: 'gl' GALLIUM_DRIVER: llvmpipe LIBGL_ALWAYS_SOFTWARE: true - run: build-windows-${{ matrix.renderer }}/mbgl-render-test-runner.exe "--manifestPath=metrics/windows-${env:manifest_file}.json" + run: $env:BUILD_DIR/mbgl-render-test-runner.exe "--manifestPath=metrics/windows-${env:manifest_file}.json" - name: Upload render test result if: always() && steps.render_test.outcome == 'failure' @@ -236,7 +254,7 @@ jobs: # expression tests - name: Run expression test - run: build-windows-${{ matrix.renderer }}/expression-test/mbgl-expression-test.exe + run: $env:BUILD_DIR/expression-test/mbgl-expression-test.exe windows-build-and-test-msys2: if: needs.pre-job.outputs.should_skip != 'true' From 5ef11cf40da3716826fcae26a68e9fc41e56f2ca Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 31 Jul 2025 13:22:35 +0200 Subject: [PATCH 14/96] Revert "add msvc arm64 runner for opengl/vulkan" This reverts commit b40f5c1dba23fa287a3bc74a21c8115c7e5f3f12. --- .github/workflows/windows-ci.yml | 42 +++++++++----------------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 7353a4eb90da..421a130d5a59 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -109,29 +109,12 @@ jobs: needs: windows-get-or-build-dependencies strategy: matrix: - include: - - renderer: opengl - runner: windows-2022 - - renderer: egl - runner: windows-2022 - - renderer: vulkan - runner: windows-2022 - - renderer: opengl - runner: windows-11-arm64 - arch: arm64 - - renderer: vulkan - runner: windows-11-arm64 - arch: arm64 - runs-on: ${{ matrix.runner }} + renderer: [opengl, egl, vulkan] + runs-on: windows-2022 steps: - run: | git config --system core.longpaths true - - name: Set build directory - run: | - $buildDir = if ("${{ matrix.arch }}" -eq "arm64") { "build-windows-arm64-${{ matrix.renderer }}" } else { "build-windows-${{ matrix.renderer }}" } - Add-Content -Path $env:GITHUB_ENV -Value "BUILD_DIR=$buildDir" - - uses: actions/checkout@v4 with: submodules: recursive @@ -171,12 +154,11 @@ jobs: timeout-minutes: 60 run: | cmake --version - $preset = if ("${{ matrix.arch }}" -eq "arm64") { "windows-arm64-${{ matrix.renderer }}" } else { "windows-${{ matrix.renderer }}" } - cmake --preset $preset -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded -DCMAKE_BUILD_TYPE=RelWithDebInfo ${{ matrix.arch == 'arm64' && '-DCMAKE_PREFIX_PATH="${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\installed\\arm64-windows"' || '' }} + cmake --preset windows-${{ matrix.renderer }} -DCMAKE_POLICY_DEFAULT_CMP0141=NEW -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded -DCMAKE_BUILD_TYPE=RelWithDebInfo - name: Build MapLibre Native Core run: | - cmake --build $env:BUILD_DIR --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test mbgl-render mbgl-benchmark-runner + cmake --build build-windows-${{ matrix.renderer }} --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test mbgl-render mbgl-benchmark-runner # CodeQL @@ -192,19 +174,19 @@ jobs: - name: Extract Mesa3D files for OpenGL if: matrix.renderer != 'vulkan' run: | - & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR .\mesa3d.7z x64\libgallium_wgl.dll x64\libGLESv2.dll + & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} .\mesa3d.7z x64\libgallium_wgl.dll x64\libGLESv2.dll - name: Extract Mesa3D files for Vulkan if: matrix.renderer == 'vulkan' run: | - & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR .\mesa3d.7z x64\lvp_icd.x86_64.json x64\vulkan_lvp.dll + & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} .\mesa3d.7z x64\lvp_icd.x86_64.json x64\vulkan_lvp.dll # unit tests - name: Configure Mesa3D drivers (OpenGL) if: matrix.renderer != 'vulkan' run: | - reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DLL /t REG_SZ /d ('{0}\{1}\libgallium_wgl.dll' -f $PWD.Path, $env:BUILD_DIR) /f + reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DLL /t REG_SZ /d ('{0}\build-windows-${{ matrix.renderer }}\libgallium_wgl.dll' -f $PWD.Path) /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v DriverVersion /t REG_DWORD /d 1 /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v Flags /t REG_DWORD /d 1 /f reg add 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\MSOGL' /v Version /t REG_DWORD /d 2 /f @@ -213,7 +195,7 @@ jobs: - name: Configure Mesa3D drivers (Vulkan) if: matrix.renderer == 'vulkan' run: | - reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v "${{ github.workspace }}\$($env:BUILD_DIR)\lvp_icd.x86_64.json" /t REG_DWORD /d 0 + reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v '${{ github.workspace }}\build-windows-${{ matrix.renderer }}\lvp_icd.x86_64.json' /t REG_DWORD /d 0 - name: Download and configure Vulkan if: matrix.renderer == 'vulkan' @@ -222,7 +204,7 @@ jobs: # $version = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows $version = '1.4.313.0' Invoke-WebRequest https://sdk.lunarg.com/sdk/download/$version/windows/VulkanRT-X64-$version-Components.zip -OutFile VulkanRT.zip - & 'C:\Program Files\7-Zip\7z.exe' e -o$env:BUILD_DIR -r .\VulkanRT.zip *x64\vulkan-1.* + & 'C:\Program Files\7-Zip\7z.exe' e -obuild-windows-${{ matrix.renderer }} -r .\VulkanRT.zip *x64\vulkan-1.* - name: Run C++ tests continue-on-error: ${{ matrix.renderer == 'vulkan' }} @@ -230,7 +212,7 @@ jobs: ANGLE_DEFAULT_PLATFORM: 'gl' GALLIUM_DRIVER: llvmpipe LIBGL_ALWAYS_SOFTWARE: true - run: $env:BUILD_DIR/mbgl-test-runner.exe + run: build-windows-${{ matrix.renderer }}/mbgl-test-runner.exe # render tests @@ -241,7 +223,7 @@ jobs: ANGLE_DEFAULT_PLATFORM: 'gl' GALLIUM_DRIVER: llvmpipe LIBGL_ALWAYS_SOFTWARE: true - run: $env:BUILD_DIR/mbgl-render-test-runner.exe "--manifestPath=metrics/windows-${env:manifest_file}.json" + run: build-windows-${{ matrix.renderer }}/mbgl-render-test-runner.exe "--manifestPath=metrics/windows-${env:manifest_file}.json" - name: Upload render test result if: always() && steps.render_test.outcome == 'failure' @@ -254,7 +236,7 @@ jobs: # expression tests - name: Run expression test - run: $env:BUILD_DIR/expression-test/mbgl-expression-test.exe + run: build-windows-${{ matrix.renderer }}/expression-test/mbgl-expression-test.exe windows-build-and-test-msys2: if: needs.pre-job.outputs.should_skip != 'true' From b951821506ab88675f647ec22e6f9cebc0e25c79 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:01:39 -0400 Subject: [PATCH 15/96] update workflow runners --- .github/workflows/node-ci.yml | 4 ++-- .github/workflows/node-release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index c3d285899453..5484b7994b6c 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -74,9 +74,9 @@ jobs: fail-fast: false matrix: include: - - runs-on: ubuntu-22.04 + - runs-on: ubuntu-24.04 arch: x86_64 - - runs-on: ubuntu-22.04-arm + - runs-on: ubuntu-24.04-arm arch: arm64 - runs-on: macos-14 arch: arm64 diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 5829a375dda2..3388f74b760c 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -44,9 +44,9 @@ jobs: fail-fast: false matrix: include: - - runs-on: ubuntu-22.04 + - runs-on: ubuntu-24.04 arch: x86_64 - - runs-on: ubuntu-22.04-arm + - runs-on: ubuntu-24.04-arm arch: arm64 - runs-on: macos-14 arch: arm64 From c61c6e16c8611932f460e09bbefee83e37c859b4 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:04:25 -0400 Subject: [PATCH 16/96] update NAN to 2.23.0 --- platform/node/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/CMakeLists.txt b/platform/node/CMakeLists.txt index 311bfc96a41e..057ad3f3d108 100644 --- a/platform/node/CMakeLists.txt +++ b/platform/node/CMakeLists.txt @@ -10,7 +10,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/module.cmake) add_node_module( mbgl-node INSTALL_PATH ${PROJECT_SOURCE_DIR}/platform/node/lib/{node_abi}/mbgl.node - NAN_VERSION 2.22.2 + NAN_VERSION 2.23.0 EXCLUDE_NODE_ABIS 46 47 From 188d01b6df0fffeb9725119bd778bf4f387a81aa Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:05:18 -0400 Subject: [PATCH 17/96] remove excluded abi 137 (node v24) --- platform/node/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/node/CMakeLists.txt b/platform/node/CMakeLists.txt index 057ad3f3d108..c6afee8484b1 100644 --- a/platform/node/CMakeLists.txt +++ b/platform/node/CMakeLists.txt @@ -16,7 +16,6 @@ add_node_module( 47 48 51 - 137 ) if(WIN32) From ac74554ea21fb4519d59ca06fecd1f9c4f04f951 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:06:40 -0400 Subject: [PATCH 18/96] use @acalcutt/node-pre-gyp to support node v24 --- platform/node/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/package.json b/platform/node/package.json index 2ff8e32f0b45..1f4afac2452d 100644 --- a/platform/node/package.json +++ b/platform/node/package.json @@ -21,7 +21,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "@mapbox/node-pre-gyp": "2.0.0", + "@acalcutt/node-pre-gyp": "2.0.1", "@acalcutt/node-pre-gyp-github": "2.0.1", "minimatch": "^9.0.4", "npm-run-all": "^4.1.5" From 7853cc5150183499cc0c23ef2944eed45c40e84e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:15:18 -0400 Subject: [PATCH 19/96] Update package-lock.json --- platform/node/package-lock.json | 287 ++++++++++++++++---------------- 1 file changed, 139 insertions(+), 148 deletions(-) diff --git a/platform/node/package-lock.json b/platform/node/package-lock.json index 9b69efc35a36..e9df42981a14 100644 --- a/platform/node/package-lock.json +++ b/platform/node/package-lock.json @@ -10,8 +10,8 @@ "hasInstallScript": true, "license": "BSD-2-Clause", "dependencies": { + "@acalcutt/node-pre-gyp": "2.0.1", "@acalcutt/node-pre-gyp-github": "2.0.1", - "@mapbox/node-pre-gyp": "2.0.0", "minimatch": "^9.0.4", "npm-run-all": "^4.1.5" }, @@ -47,6 +47,27 @@ "node": ">=18" } }, + "node_modules/@acalcutt/node-pre-gyp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@acalcutt/node-pre-gyp/-/node-pre-gyp-2.0.1.tgz", + "integrity": "sha512-iwAjNkgAdO2wCdKTGDtTcDhev2DXkQELb7JAxjltfR/3ryKWIdR2fQla/T6APrY8N3SisA11Why9X8NyJafhpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "consola": "^3.2.3", + "detect-libc": "^2.0.0", + "https-proxy-agent": "^7.0.5", + "node-fetch": "^2.6.7", + "nopt": "^8.0.0", + "semver": "^7.5.3", + "tar": "^7.4.0" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@acalcutt/node-pre-gyp-github": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@acalcutt/node-pre-gyp-github/-/node-pre-gyp-github-2.0.1.tgz", @@ -1050,15 +1071,6 @@ "node": ">=18.0.0" } }, - "node_modules/@isaacs/fs-minipass/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/@ljharb/resumer": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", @@ -1113,144 +1125,6 @@ "protocol-buffers-schema": "^3.3.2" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", - "integrity": "sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==", - "license": "BSD-3-Clause", - "dependencies": { - "consola": "^3.2.3", - "detect-libc": "^2.0.0", - "https-proxy-agent": "^7.0.5", - "node-fetch": "^2.6.7", - "nopt": "^8.0.0", - "semver": "^7.5.3", - "tar": "^7.4.0" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/abbrev": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", - "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/minizlib": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", - "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", - "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", - "license": "ISC", - "dependencies": { - "abbrev": "^3.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, "node_modules/@mapbox/point-geometry": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", @@ -2437,6 +2311,15 @@ "undici-types": "~6.21.0" } }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2450,6 +2333,15 @@ "node": ">= 0.6" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2773,6 +2665,15 @@ "node": ">=4" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -3820,6 +3721,19 @@ "node": ">= 0.8" } }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4541,6 +4455,42 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mock-property": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", @@ -4615,6 +4565,21 @@ "node": ">=0.10.0" } }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5515,6 +5480,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -5808,6 +5790,15 @@ "bin": { "uuid": "dist/bin/uuid" } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } } } } From 4e1b26d1f422e289f7b718a841a7d16c8736cea0 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:17:02 -0400 Subject: [PATCH 20/96] Update publish.sh --- platform/node/scripts/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/scripts/publish.sh b/platform/node/scripts/publish.sh index 5cd2dd8be39f..ab7a660e3bdf 100755 --- a/platform/node/scripts/publish.sh +++ b/platform/node/scripts/publish.sh @@ -9,7 +9,7 @@ if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" # Changes to the version targets here should happen in tandem with updates to the # EXCLUDE_NODE_ABIS property in cmake/node.cmake and the "node" engines property in # package.json. - for TARGET in 18.0.0 20.0.0 22.0.0; do + for TARGET in 18.0.0 20.0.0 22.0.0 24.0.0; do rm -rf build/stage if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then From dca0899ab19ceff76d7ee36c6058ab7f91510f0a Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:23:16 -0400 Subject: [PATCH 21/96] remove cmake specified version --- .github/workflows/node-ci.yml | 7 ------- .github/workflows/node-release.yml | 6 ------ 2 files changed, 13 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 5484b7994b6c..64d298f250c5 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -156,13 +156,6 @@ jobs: $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Setup cmake - # linux arm not supported https://github.com/jwlawson/actions-setup-cmake/issues/79 - if: ${{contains(runner.name, 'GitHub Actions') && matrix.runs-on != 'ubuntu-22.04-arm' }} - uses: jwlawson/actions-setup-cmake@v2 - with: - cmake-version: '3.31' - - name: cmake version run: | cmake --version diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 3388f74b760c..e49ccec8edb3 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -126,12 +126,6 @@ jobs: $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Setup cmake - if: ${{contains(runner.name, 'GitHub Actions')}} - uses: jwlawson/actions-setup-cmake@v2 - with: - cmake-version: '3.31' - - name: cmake version run: | cmake --version From 12b73662134f1e1702b67c878b61f2b10ffdf205 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:54:41 -0400 Subject: [PATCH 22/96] add arm64 detection to module.cmake --- platform/node/cmake/module.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/node/cmake/module.cmake b/platform/node/cmake/module.cmake index e6443e2e4992..0f320c5be60d 100644 --- a/platform/node/cmake/module.cmake +++ b/platform/node/cmake/module.cmake @@ -121,7 +121,10 @@ function(add_node_module NAME) endif() if(WIN32) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # Determine Windows architecture + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + set(_ARCH arm64) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_ARCH x64) else() set(_ARCH x86) From 6a98a8ef6d2d1c0e772d5dcdd80e9bf31c7060fa Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 14:59:45 -0400 Subject: [PATCH 23/96] add windows-11-arm to workflows --- .github/workflows/node-ci.yml | 6 ++++-- .github/workflows/node-release.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 64d298f250c5..66cd97034436 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -78,12 +78,14 @@ jobs: arch: x86_64 - runs-on: ubuntu-24.04-arm arch: arm64 - - runs-on: macos-14 - arch: arm64 - runs-on: macos-13 arch: x86_64 + - runs-on: macos-14 + arch: arm64 - runs-on: windows-2022 arch: x86_64 + - runs-on: windows-11-arm + arch: arm64 continue-on-error: true env: BUILDTYPE: "Release" diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index e49ccec8edb3..9dacc5c68c91 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -48,12 +48,14 @@ jobs: arch: x86_64 - runs-on: ubuntu-24.04-arm arch: arm64 - - runs-on: macos-14 - arch: arm64 - runs-on: macos-13 arch: x86_64 + - runs-on: macos-14 + arch: arm64 - runs-on: windows-2022 arch: x86_64 + - runs-on: windows-11-arm + arch: arm64 continue-on-error: true env: BUILDTYPE: "Release" From 7c6920e7003145be3f3f1e8a752736af8ecbe6f8 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 15:20:14 -0400 Subject: [PATCH 24/96] try adding DCMAKE_PREFIX_PATH on arm windows --- .github/workflows/node-ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 66cd97034436..ff915c3d6326 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -220,7 +220,7 @@ jobs: key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" @@ -232,6 +232,20 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` -DMLN_WITH_NODE=ON + - name: Configure maplibre-native (Windows) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake . -B build ` + -G Ninja ` + -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` + -DMLN_WITH_NODE=ON ` + -DCMAKE_PREFIX_PATH=${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\installed\\arm64-windows + - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' run: | From 1ada8b764cba0176796104dd6524ddbc845a8b61 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 15:48:21 -0400 Subject: [PATCH 25/96] test ai fixes --- platform/windows/Get-VendorPackages.ps1 | 86 +++++++++++++++++++++---- platform/windows/windows.cmake | 65 +++++++++++++++++-- 2 files changed, 133 insertions(+), 18 deletions(-) diff --git a/platform/windows/Get-VendorPackages.ps1 b/platform/windows/Get-VendorPackages.ps1 index 5874a32f1b17..7282095dc4a6 100644 --- a/platform/windows/Get-VendorPackages.ps1 +++ b/platform/windows/Get-VendorPackages.ps1 @@ -6,12 +6,52 @@ param( Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) -$vcpkg_temp_dir = '***' +# Check if this is an ARM64 build and handle accordingly +$IsARM64 = $Triplet -match "arm64" + +if ($IsARM64) { + Write-Host "ARM64 build detected. Checking for pre-installed packages..." -ForegroundColor Yellow + + # Define expected package locations for ARM64 + $vcpkg_installed_dir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', $Triplet) + + # Check if packages are already installed + $required_packages = @('curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp') + if (${With-ICU}) { + $required_packages += 'icu' + } + + switch($Renderer) { + 'EGL' { $required_packages += @('egl', 'opengl-registry') } + 'OpenGL' { $required_packages += @('opengl-registry') } + 'All' { $required_packages += @('egl', 'opengl-registry') } + } + + $missing_packages = @() + foreach ($package in $required_packages) { + $package_dir = [System.IO.Path]::Combine($vcpkg_installed_dir, 'share', $package) + if (-not (Test-Path $package_dir)) { + $missing_packages += $package + } + } + + if ($missing_packages.Count -gt 0) { + Write-Host "Missing ARM64 packages: $($missing_packages -join ', ')" -ForegroundColor Red + Write-Host "Please install these packages manually using:" -ForegroundColor Yellow + Write-Host "vcpkg install $($missing_packages -join ' ') --triplet=$Triplet" -ForegroundColor Cyan + + # Try to proceed with automatic installation with ARM64-specific settings + Write-Host "Attempting automatic installation with ARM64 workarounds..." -ForegroundColor Yellow + } else { + Write-Host "All required ARM64 packages are already installed." -ForegroundColor Green + return + } +} +$vcpkg_temp_dir = '***' foreach($letter in [byte][char]'Z'..[byte][char]'A') { $vcpkg_temp_dir = '{0}:' -f [char]$letter - if(-not (Test-Path $vcpkg_temp_dir)) { & subst $vcpkg_temp_dir ([System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg')) @@ -33,14 +73,38 @@ if(-not (Test-Path ('{0}\vcpkg.exe' -f $vcpkg_temp_dir))) & ('{0}\bootstrap-vcpkg.bat' -f $vcpkg_temp_dir) } -& ('{0}\vcpkg.exe' -f $vcpkg_temp_dir) $( - @( - '--disable-metrics', - ('--overlay-triplets={0}' -f [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets')), - ('--triplet={0}' -f $Triplet), - '--clean-after-build', - 'install', 'curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp' - ) + $renderer_packages + $(if(${With-ICU}) {@('icu')} else {@()}) +# ARM64-specific vcpkg arguments +$vcpkg_args = @( + '--disable-metrics', + ('--overlay-triplets={0}' -f [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets')), + ('--triplet={0}' -f $Triplet), + '--clean-after-build' ) -subst $vcpkg_temp_dir /D +# Add ARM64-specific flags to help with compiler detection +if ($IsARM64) { + $vcpkg_args += '--allow-unsupported' + $env:VCPKG_FORCE_SYSTEM_BINARIES = '1' + $env:VCPKG_DISABLE_COMPILER_TRACKING = '1' + Write-Host "Using ARM64 compatibility flags for vcpkg" -ForegroundColor Yellow +} + +$packages = @('install', 'curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp') + $renderer_packages + $(if(${With-ICU}) {@('icu')} else {@()}) + +try { + & ('{0}\vcpkg.exe' -f $vcpkg_temp_dir) ($vcpkg_args + $packages) + + if ($LASTEXITCODE -ne 0 -and $IsARM64) { + Write-Host "vcpkg installation failed for ARM64. This is expected due to compiler detection issues." -ForegroundColor Yellow + Write-Host "Please manually install the required packages or use pre-built binaries." -ForegroundColor Yellow + Write-Host "Required packages: $($packages[1..($packages.Length-1)] -join ', ')" -ForegroundColor Cyan + } +} catch { + if ($IsARM64) { + Write-Host "vcpkg execution failed for ARM64. Using fallback strategy." -ForegroundColor Yellow + } else { + throw + } +} finally { + subst $vcpkg_temp_dir /D +} diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 7487611ddf29..2dba379caf0b 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -11,11 +11,39 @@ if(MSVC) set(WITH_ICU -With-ICU) endif() - # Skip Get-VendorPackages.ps1 for ARM64 due to vcpkg compiler detection issues - # The required packages should already be installed - if(NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")) + # Handle ARM64 package management + set(IS_ARM64_BUILD FALSE) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + set(IS_ARM64_BUILD TRUE) + endif() + + if(NOT IS_ARM64_BUILD) + # Standard package installation for x86/x64 execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) + else() + # ARM64-specific package handling + message(STATUS "ARM64 build detected - checking for pre-installed packages") + + # Try to run the enhanced script that handles ARM64 + execute_process( + COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU} + RESULT_VARIABLE VCPKG_RESULT + OUTPUT_VARIABLE VCPKG_OUTPUT + ERROR_VARIABLE VCPKG_ERROR + ) + + if(NOT VCPKG_RESULT EQUAL 0) + message(WARNING "vcpkg package installation failed for ARM64. Error: ${VCPKG_ERROR}") + message(STATUS "Assuming packages are pre-installed or will be handled manually") + endif() + + # Set up fallback paths for ARM64 packages if vcpkg fails + if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows") + message(STATUS "Using x64 package fallback for ARM64 build") + set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows" ${CMAKE_PREFIX_PATH}) + endif() endif() + unset(_RENDERER) add_compile_definitions(NOMINMAX GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE) @@ -35,7 +63,9 @@ if(MSVC) find_package(WebP REQUIRED) # ARM64 specific fixes - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + if(IS_ARM64_BUILD) + message(STATUS "Applying ARM64-specific fixes") + # Simplify library variables to avoid complex generator expressions if(TARGET JPEG::JPEG) set(JPEG_LIBRARIES JPEG::JPEG) @@ -48,17 +78,37 @@ if(MSVC) # Fix ICU::data target which might not exist for ARM64 if(NOT TARGET ICU::data AND TARGET ICU::uc) add_library(ICU::data INTERFACE IMPORTED) + message(STATUS "Created placeholder ICU::data target for ARM64") endif() # Use x86 OpenGL headers if ARM64 headers are missing - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include/GLES3") - include_directories("${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") - message(STATUS "Using x86 OpenGL headers for ARM64 build") + set(X86_HEADERS_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") + if(EXISTS "${X86_HEADERS_PATH}/GLES3") + include_directories("${X86_HEADERS_PATH}") + message(STATUS "Using x86 OpenGL headers for ARM64 build at: ${X86_HEADERS_PATH}") + else() + # Try x64 headers as fallback + set(X64_HEADERS_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows/include") + if(EXISTS "${X64_HEADERS_PATH}/GLES3") + include_directories("${X64_HEADERS_PATH}") + message(STATUS "Using x64 OpenGL headers for ARM64 build at: ${X64_HEADERS_PATH}") + else() + message(WARNING "No compatible OpenGL headers found for ARM64 build") + endif() endif() + + # Additional ARM64 compiler flags if needed + target_compile_options( + mbgl-compiler-options + INTERFACE + $<$:/bigobj> # Handle large object files on ARM64 + ) endif() find_path(DLFCN_INCLUDE_DIRS dlfcn.h) find_path(LIBUV_INCLUDE_DIRS uv.h) + + # Rest of the file remains the same... elseif(DEFINED ENV{MSYSTEM}) set(MSYS 1) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") @@ -79,6 +129,7 @@ else() message(FATAL_ERROR "Unsupported build system: " ${CMAKE_SYSTEM_NAME}) endif() +# Continue with the rest of your existing code... target_sources( mbgl-core PRIVATE From ce8a2468db16e88f88279dc12bcdcaad1bec4f24 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 16:10:05 -0400 Subject: [PATCH 26/96] ai test 2 --- platform/windows/Get-VendorPackages.ps1 | 229 ++++++++++++++++++------ platform/windows/windows.cmake | 187 +++++++++++++------ 2 files changed, 310 insertions(+), 106 deletions(-) diff --git a/platform/windows/Get-VendorPackages.ps1 b/platform/windows/Get-VendorPackages.ps1 index 7282095dc4a6..e07163caf71e 100644 --- a/platform/windows/Get-VendorPackages.ps1 +++ b/platform/windows/Get-VendorPackages.ps1 @@ -1,51 +1,74 @@ param( - [Parameter(Mandatory=$true)][string]$Triplet, - [Parameter(Mandatory=$true)][string]$Renderer, + [Parameter(Mandatory=$true)][string]$Triplet, + [Parameter(Mandatory=$true)][string]$Renderer, [Parameter(Mandatory=$false)][switch]${With-ICU} ) Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) -# Check if this is an ARM64 build and handle accordingly +# Check if this is an ARM64 build $IsARM64 = $Triplet -match "arm64" +# Enhanced ARM64 environment setup if ($IsARM64) { - Write-Host "ARM64 build detected. Checking for pre-installed packages..." -ForegroundColor Yellow + Write-Host "Setting up ARM64 build environment..." -ForegroundColor Green - # Define expected package locations for ARM64 - $vcpkg_installed_dir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', $Triplet) - - # Check if packages are already installed - $required_packages = @('curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp') - if (${With-ICU}) { - $required_packages += 'icu' - } + # Set environment variables to help vcpkg with ARM64 detection + $env:VCPKG_FORCE_SYSTEM_BINARIES = '1' + $env:VCPKG_DISABLE_COMPILER_TRACKING = '1' + $env:VCPKG_KEEP_ENV_VARS = 'VCPKG_FORCE_SYSTEM_BINARIES;VCPKG_DISABLE_COMPILER_TRACKING' - switch($Renderer) { - 'EGL' { $required_packages += @('egl', 'opengl-registry') } - 'OpenGL' { $required_packages += @('opengl-registry') } - 'All' { $required_packages += @('egl', 'opengl-registry') } - } + # Find Visual Studio installation with ARM64 tools + $vsInstallPath = $null + $vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - $missing_packages = @() - foreach ($package in $required_packages) { - $package_dir = [System.IO.Path]::Combine($vcpkg_installed_dir, 'share', $package) - if (-not (Test-Path $package_dir)) { - $missing_packages += $package + if (Test-Path $vsWhere) { + $vsInstallPath = & $vsWhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.ARM64 -property installationPath + if ($vsInstallPath) { + Write-Host "Found Visual Studio with ARM64 tools at: $vsInstallPath" -ForegroundColor Green + + # Set up ARM64 cross-compilation environment + $vcvarsPath = Join-Path $vsInstallPath "VC\Auxiliary\Build\vcvarsall.bat" + if (Test-Path $vcvarsPath) { + Write-Host "Setting up ARM64 cross-compilation environment..." -ForegroundColor Yellow + + # Create a temporary batch file to set up environment and run vcpkg + $tempBatch = [System.IO.Path]::GetTempFileName() + ".bat" + $vcpkgScript = @" +@echo off +call "$vcvarsPath" x64_arm64 +set VCPKG_DEFAULT_TRIPLET=$Triplet +set VCPKG_FORCE_SYSTEM_BINARIES=1 +set VCPKG_DISABLE_COMPILER_TRACKING=1 +echo ARM64 environment variables set: +echo VCPKG_DEFAULT_TRIPLET=%VCPKG_DEFAULT_TRIPLET% +echo VCPKG_FORCE_SYSTEM_BINARIES=%VCPKG_FORCE_SYSTEM_BINARIES% +echo VCPKG_DISABLE_COMPILER_TRACKING=%VCPKG_DISABLE_COMPILER_TRACKING% +"@ + Set-Content -Path $tempBatch -Value $vcpkgScript -Encoding ASCII + + # Execute the environment setup + $envOutput = & cmd.exe /c "$tempBatch && set" + Remove-Item $tempBatch -Force + + # Parse and set environment variables from the batch output + foreach ($line in $envOutput) { + if ($line -match '^([^=]+)=(.*)$') { + $name = $matches[1] + $value = $matches[2] + # Only set important environment variables, avoid overriding PowerShell vars + if ($name -in @('PATH', 'INCLUDE', 'LIB', 'LIBPATH', 'VCINSTALLDIR', 'WindowsSDKDir', 'VCPKG_DEFAULT_TRIPLET', 'VCPKG_FORCE_SYSTEM_BINARIES', 'VCPKG_DISABLE_COMPILER_TRACKING')) { + [Environment]::SetEnvironmentVariable($name, $value, 'Process') + } + } + } + Write-Host "ARM64 build environment configured successfully" -ForegroundColor Green + } + } else { + Write-Warning "Visual Studio with ARM64 tools not found. Please install 'MSVC v143 - VS 2022 C++ ARM64 build tools'" + Write-Host "You can install it via Visual Studio Installer > Individual Components > MSVC v143 - VS 2022 C++ ARM64 build tools" -ForegroundColor Yellow } } - - if ($missing_packages.Count -gt 0) { - Write-Host "Missing ARM64 packages: $($missing_packages -join ', ')" -ForegroundColor Red - Write-Host "Please install these packages manually using:" -ForegroundColor Yellow - Write-Host "vcpkg install $($missing_packages -join ' ') --triplet=$Triplet" -ForegroundColor Cyan - - # Try to proceed with automatic installation with ARM64-specific settings - Write-Host "Attempting automatic installation with ARM64 workarounds..." -ForegroundColor Yellow - } else { - Write-Host "All required ARM64 packages are already installed." -ForegroundColor Green - return - } } $vcpkg_temp_dir = '***' @@ -64,16 +87,22 @@ switch($Renderer) { 'EGL' { $renderer_packages = @('egl', 'opengl-registry'); break } 'OpenGL' { $renderer_packages = @('opengl-registry'); break } - 'Vulkan' { $renderer_packages = @(); break } - 'All' { $renderer_packages = @('egl', 'opengl-registry'); break } + 'Vulkan' { $renderer_packages = @(); break } + 'All' { $renderer_packages = @('egl', 'opengl-registry'); break } } +# Bootstrap vcpkg if needed if(-not (Test-Path ('{0}\vcpkg.exe' -f $vcpkg_temp_dir))) { - & ('{0}\bootstrap-vcpkg.bat' -f $vcpkg_temp_dir) + Write-Host "Bootstrapping vcpkg..." -ForegroundColor Yellow + $bootstrapResult = & ('{0}\bootstrap-vcpkg.bat' -f $vcpkg_temp_dir) + if ($LASTEXITCODE -ne 0) { + Write-Error "Failed to bootstrap vcpkg" + exit 1 + } } -# ARM64-specific vcpkg arguments +# Prepare vcpkg arguments $vcpkg_args = @( '--disable-metrics', ('--overlay-triplets={0}' -f [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets')), @@ -81,30 +110,128 @@ $vcpkg_args = @( '--clean-after-build' ) -# Add ARM64-specific flags to help with compiler detection +# ARM64-specific vcpkg configurations if ($IsARM64) { - $vcpkg_args += '--allow-unsupported' - $env:VCPKG_FORCE_SYSTEM_BINARIES = '1' - $env:VCPKG_DISABLE_COMPILER_TRACKING = '1' - Write-Host "Using ARM64 compatibility flags for vcpkg" -ForegroundColor Yellow + Write-Host "Configuring vcpkg for ARM64 build..." -ForegroundColor Yellow + + # Create ARM64-specific triplet if it doesn't exist + $customTripletsDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets') + $arm64TripletPath = Join-Path $customTripletsDir "arm64-windows-custom.cmake" + + if (-not (Test-Path $customTripletsDir)) { + New-Item -ItemType Directory -Path $customTripletsDir -Force + } + + if (-not (Test-Path $arm64TripletPath)) { + $arm64TripletContent = @" +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +set(VCPKG_CMAKE_SYSTEM_NAME Windows) + +# ARM64 specific configurations +set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_FORCE_SYSTEM_BINARIES VCPKG_DISABLE_COMPILER_TRACKING) +set(VCPKG_BUILD_TYPE release) + +# Use host tools for cross-compilation +set(VCPKG_CROSSCOMPILING ON) +set(VCPKG_TARGET_IS_WINDOWS ON) +"@ + Set-Content -Path $arm64TripletPath -Value $arm64TripletContent -Encoding UTF8 + Write-Host "Created ARM64 custom triplet at: $arm64TripletPath" -ForegroundColor Green + } + + # Use the custom triplet for ARM64 + if ($Triplet -eq "arm64-windows") { + $vcpkg_args = $vcpkg_args | ForEach-Object { if ($_ -match "--triplet=") { "--triplet=arm64-windows-custom" } else { $_ } } + } + + # Add ARM64-specific flags + $vcpkg_args += @( + '--allow-unsupported', + '--x-install-root=' + [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed') + ) + + Write-Host "Using ARM64 vcpkg arguments: $($vcpkg_args -join ' ')" -ForegroundColor Cyan } $packages = @('install', 'curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp') + $renderer_packages + $(if(${With-ICU}) {@('icu')} else {@()}) +Write-Host "Installing packages: $($packages[1..($packages.Length-1)] -join ', ')" -ForegroundColor Green +Write-Host "Triplet: $Triplet" -ForegroundColor Green + try { - & ('{0}\vcpkg.exe' -f $vcpkg_temp_dir) ($vcpkg_args + $packages) + # Run vcpkg with all arguments + $vcpkgExe = '{0}\vcpkg.exe' -f $vcpkg_temp_dir + $allArgs = $vcpkg_args + $packages + + Write-Host "Executing: $vcpkgExe $($allArgs -join ' ')" -ForegroundColor Cyan - if ($LASTEXITCODE -ne 0 -and $IsARM64) { - Write-Host "vcpkg installation failed for ARM64. This is expected due to compiler detection issues." -ForegroundColor Yellow - Write-Host "Please manually install the required packages or use pre-built binaries." -ForegroundColor Yellow - Write-Host "Required packages: $($packages[1..($packages.Length-1)] -join ', ')" -ForegroundColor Cyan + & $vcpkgExe $allArgs + + if ($LASTEXITCODE -ne 0) { + if ($IsARM64) { + Write-Host "vcpkg installation failed for ARM64. Attempting workarounds..." -ForegroundColor Yellow + + # Try installing packages one by one for better error diagnosis + foreach ($package in $packages[1..($packages.Length-1)]) { + Write-Host "Attempting to install: $package" -ForegroundColor Yellow + $singlePackageArgs = $vcpkg_args + @('install', $package) + + & $vcpkgExe $singlePackageArgs + + if ($LASTEXITCODE -eq 0) { + Write-Host "Successfully installed: $package" -ForegroundColor Green + } else { + Write-Warning "Failed to install: $package" + + # For critical packages, try alternative approaches + if ($package -in @('curl', 'libuv', 'libpng', 'libjpeg-turbo')) { + Write-Host "Trying to install $package with different options..." -ForegroundColor Yellow + $fallbackArgs = @('--disable-metrics', '--triplet=arm64-windows', '--allow-unsupported', 'install', $package) + & $vcpkgExe $fallbackArgs + + if ($LASTEXITCODE -eq 0) { + Write-Host "Successfully installed $package with fallback method" -ForegroundColor Green + } + } + } + } + } else { + Write-Error "vcpkg installation failed with exit code: $LASTEXITCODE" + exit $LASTEXITCODE + } + } else { + Write-Host "All packages installed successfully!" -ForegroundColor Green + + # Verify ARM64 installation + if ($IsARM64) { + $arm64InstallDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', 'arm64-windows-custom') + if (-not (Test-Path $arm64InstallDir)) { + $arm64InstallDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', 'arm64-windows') + } + + if (Test-Path $arm64InstallDir) { + Write-Host "ARM64 packages successfully installed at: $arm64InstallDir" -ForegroundColor Green + + # List installed packages for verification + $installedPackages = Get-ChildItem -Path (Join-Path $arm64InstallDir 'share') -Directory | Select-Object -ExpandProperty Name + Write-Host "Installed ARM64 packages: $($installedPackages -join ', ')" -ForegroundColor Green + } + } } + } catch { + Write-Error "vcpkg execution failed: $_" if ($IsARM64) { - Write-Host "vcpkg execution failed for ARM64. Using fallback strategy." -ForegroundColor Yellow - } else { - throw + Write-Host "This might be due to ARM64 toolchain issues. Please ensure:" -ForegroundColor Yellow + Write-Host "1. Visual Studio 2022 with ARM64 build tools is installed" -ForegroundColor Yellow + Write-Host "2. Windows SDK 10.0.19041.0 or later is installed" -ForegroundColor Yellow + Write-Host "3. CMake 3.20 or later is installed" -ForegroundColor Yellow } + throw } finally { subst $vcpkg_temp_dir /D } + +Write-Host "Package installation completed!" -ForegroundColor Green diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 2dba379caf0b..7024ded94f5b 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -11,38 +11,47 @@ if(MSVC) set(WITH_ICU -With-ICU) endif() - # Handle ARM64 package management + # Determine if this is an ARM64 build set(IS_ARM64_BUILD FALSE) - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") set(IS_ARM64_BUILD TRUE) - endif() - - if(NOT IS_ARM64_BUILD) - # Standard package installation for x86/x64 - execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) - else() - # ARM64-specific package handling - message(STATUS "ARM64 build detected - checking for pre-installed packages") + message(STATUS "Configuring for ARM64 build") - # Try to run the enhanced script that handles ARM64 - execute_process( - COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU} - RESULT_VARIABLE VCPKG_RESULT - OUTPUT_VARIABLE VCPKG_OUTPUT - ERROR_VARIABLE VCPKG_ERROR - ) - - if(NOT VCPKG_RESULT EQUAL 0) - message(WARNING "vcpkg package installation failed for ARM64. Error: ${VCPKG_ERROR}") - message(STATUS "Assuming packages are pre-installed or will be handled manually") + # Ensure proper triplet for ARM64 + if(NOT VCPKG_TARGET_TRIPLET) + set(VCPKG_TARGET_TRIPLET "arm64-windows") endif() - # Set up fallback paths for ARM64 packages if vcpkg fails - if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows") - message(STATUS "Using x64 package fallback for ARM64 build") - set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows" ${CMAKE_PREFIX_PATH}) + # Set ARM64-specific CMake variables + set(CMAKE_SYSTEM_PROCESSOR ARM64) + if(NOT CMAKE_GENERATOR_PLATFORM) + set(CMAKE_GENERATOR_PLATFORM ARM64) endif() endif() + + # Always run the vendor packages script - it now handles ARM64 properly + message(STATUS "Installing vendor packages for triplet: ${VCPKG_TARGET_TRIPLET}") + execute_process( + COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU} + RESULT_VARIABLE VCPKG_RESULT + OUTPUT_VARIABLE VCPKG_OUTPUT + ERROR_VARIABLE VCPKG_ERROR + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} + ) + + if(NOT VCPKG_RESULT EQUAL 0) + message(WARNING "vcpkg package installation had issues:") + message(WARNING "Output: ${VCPKG_OUTPUT}") + message(WARNING "Error: ${VCPKG_ERROR}") + if(IS_ARM64_BUILD) + message(STATUS "This is expected for ARM64 builds due to limited package availability") + message(STATUS "Continuing with available packages...") + else() + message(FATAL_ERROR "Failed to install required packages") + endif() + else() + message(STATUS "Successfully installed vendor packages") + endif() unset(_RENDERER) @@ -54,7 +63,60 @@ if(MSVC) /MP ) - find_package(CURL REQUIRED) + # ARM64-specific compiler options + if(IS_ARM64_BUILD) + message(STATUS "Adding ARM64-specific compiler options") + target_compile_options( + mbgl-compiler-options + INTERFACE + $<$:/bigobj> # Handle large object files + $<$:/EHsc> # Exception handling + $<$:/TC> # Treat .c files as C + $<$:/TP> # Treat .cpp files as C++ + ) + + # Set up ARM64 cross-compilation paths + set(ARM64_VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed") + + # Check for custom ARM64 triplet first, then standard + if(EXISTS "${ARM64_VCPKG_ROOT}/arm64-windows-custom") + set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/arm64-windows-custom") + message(STATUS "Using ARM64 custom triplet packages at: ${ARM64_INSTALL_PATH}") + elseif(EXISTS "${ARM64_VCPKG_ROOT}/arm64-windows") + set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/arm64-windows") + message(STATUS "Using ARM64 standard triplet packages at: ${ARM64_INSTALL_PATH}") + else() + message(WARNING "ARM64 packages not found, using x64 fallback") + set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/x64-windows") + endif() + + # Set CMAKE_PREFIX_PATH for ARM64 + list(PREPEND CMAKE_PREFIX_PATH "${ARM64_INSTALL_PATH}") + message(STATUS "Added ARM64 package path to CMAKE_PREFIX_PATH: ${ARM64_INSTALL_PATH}") + endif() + + # Find packages with ARM64 awareness + if(IS_ARM64_BUILD) + # For ARM64, we might need to be more flexible with package finding + find_package(CURL QUIET) + if(NOT CURL_FOUND) + message(STATUS "CURL not found via find_package, trying manual detection for ARM64") + find_path(CURL_INCLUDE_DIR curl/curl.h PATHS "${ARM64_INSTALL_PATH}/include") + find_library(CURL_LIBRARY NAMES curl libcurl PATHS "${ARM64_INSTALL_PATH}/lib" "${ARM64_INSTALL_PATH}/debug/lib") + if(CURL_INCLUDE_DIR AND CURL_LIBRARY) + set(CURL_FOUND TRUE) + add_library(CURL::libcurl UNKNOWN IMPORTED) + set_target_properties(CURL::libcurl PROPERTIES + IMPORTED_LOCATION "${CURL_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") + set(CURL_LIBRARIES CURL::libcurl) + message(STATUS "Found CURL manually for ARM64: ${CURL_LIBRARY}") + endif() + endif() + else() + find_package(CURL REQUIRED) + endif() + find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) find_package(JPEG REQUIRED) @@ -62,53 +124,68 @@ if(MSVC) find_package(PNG REQUIRED) find_package(WebP REQUIRED) - # ARM64 specific fixes + # ARM64-specific package fixes if(IS_ARM64_BUILD) - message(STATUS "Applying ARM64-specific fixes") + message(STATUS "Applying ARM64-specific package fixes") - # Simplify library variables to avoid complex generator expressions + # Simplify library targets for ARM64 compatibility if(TARGET JPEG::JPEG) set(JPEG_LIBRARIES JPEG::JPEG) + elseif(JPEG_LIBRARIES) + # Create target if it doesn't exist + add_library(JPEG::JPEG UNKNOWN IMPORTED) + set_target_properties(JPEG::JPEG PROPERTIES IMPORTED_LOCATION "${JPEG_LIBRARIES}") endif() if(TARGET PNG::PNG) set(PNG_LIBRARIES PNG::PNG) + elseif(PNG_LIBRARIES) + add_library(PNG::PNG UNKNOWN IMPORTED) + set_target_properties(PNG::PNG PROPERTIES IMPORTED_LOCATION "${PNG_LIBRARIES}") endif() - # Fix ICU::data target which might not exist for ARM64 - if(NOT TARGET ICU::data AND TARGET ICU::uc) - add_library(ICU::data INTERFACE IMPORTED) - message(STATUS "Created placeholder ICU::data target for ARM64") + if(TARGET WebP::webp) + set(WEBP_LIBRARIES WebP::webp) + elseif(TARGET WebP::WebP) + set(WEBP_LIBRARIES WebP::WebP) + elseif(WEBP_LIBRARIES) + add_library(WebP::webp UNKNOWN IMPORTED) + set_target_properties(WebP::webp PROPERTIES IMPORTED_LOCATION "${WEBP_LIBRARIES}") + set(WEBP_LIBRARIES WebP::webp) endif() - # Use x86 OpenGL headers if ARM64 headers are missing - set(X86_HEADERS_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x86-windows/include") - if(EXISTS "${X86_HEADERS_PATH}/GLES3") - include_directories("${X86_HEADERS_PATH}") - message(STATUS "Using x86 OpenGL headers for ARM64 build at: ${X86_HEADERS_PATH}") - else() - # Try x64 headers as fallback - set(X64_HEADERS_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/x64-windows/include") - if(EXISTS "${X64_HEADERS_PATH}/GLES3") - include_directories("${X64_HEADERS_PATH}") - message(STATUS "Using x64 OpenGL headers for ARM64 build at: ${X64_HEADERS_PATH}") - else() - message(WARNING "No compatible OpenGL headers found for ARM64 build") + # Handle ICU targets for ARM64 + if(ICU_FOUND) + if(NOT TARGET ICU::data AND (TARGET ICU::uc OR TARGET ICU::i18n)) + add_library(ICU::data INTERFACE IMPORTED) + message(STATUS "Created ICU::data interface target for ARM64") endif() + else() + message(STATUS "ICU not found for ARM64, will use builtin ICU") + set(MLN_USE_BUILTIN_ICU TRUE) + endif() + + # Handle libuv target normalization + if(TARGET libuv::uv_a) + set(LIBUV_LIBRARIES libuv::uv_a) + elseif(TARGET libuv::uv) + set(LIBUV_LIBRARIES libuv::uv) + elseif(TARGET uv_a) + set(LIBUV_LIBRARIES uv_a) + elseif(TARGET uv) + set(LIBUV_LIBRARIES uv) + endif() + + # Set up include directories for ARM64 + if(EXISTS "${ARM64_INSTALL_PATH}/include") + include_directories("${ARM64_INSTALL_PATH}/include") + message(STATUS "Added ARM64 include directory: ${ARM64_INSTALL_PATH}/include") endif() - - # Additional ARM64 compiler flags if needed - target_compile_options( - mbgl-compiler-options - INTERFACE - $<$:/bigobj> # Handle large object files on ARM64 - ) endif() find_path(DLFCN_INCLUDE_DIRS dlfcn.h) find_path(LIBUV_INCLUDE_DIRS uv.h) - # Rest of the file remains the same... elseif(DEFINED ENV{MSYSTEM}) set(MSYS 1) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") @@ -129,7 +206,7 @@ else() message(FATAL_ERROR "Unsupported build system: " ${CMAKE_SYSTEM_NAME}) endif() -# Continue with the rest of your existing code... +# Rest of your existing configuration... target_sources( mbgl-core PRIVATE From e0739367b5d2db836ffd453148265b8acafee579 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 16:27:11 -0400 Subject: [PATCH 27/96] ai test 3 --- platform/windows/windows.cmake | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 7024ded94f5b..57361b2d9daa 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -17,16 +17,32 @@ if(MSVC) set(IS_ARM64_BUILD TRUE) message(STATUS "Configuring for ARM64 build") - # Ensure proper triplet for ARM64 - if(NOT VCPKG_TARGET_TRIPLET) - set(VCPKG_TARGET_TRIPLET "arm64-windows") + # Debug: Show what VCPKG_TARGET_TRIPLET was set to + message(STATUS "Current VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") + message(STATUS "CMAKE_SYSTEM_PROCESSOR: '${CMAKE_SYSTEM_PROCESSOR}'") + message(STATUS "CMAKE_GENERATOR_PLATFORM: '${CMAKE_GENERATOR_PLATFORM}'") + + # Force ARM64 triplet regardless of what was set before + if(VCPKG_TARGET_TRIPLET AND NOT VCPKG_TARGET_TRIPLET MATCHES "arm64") + message(WARNING "VCPKG_TARGET_TRIPLET was set to '${VCPKG_TARGET_TRIPLET}' but this is an ARM64 build. Overriding to 'arm64-windows'") + set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "Target triplet for vcpkg" FORCE) + elseif(NOT VCPKG_TARGET_TRIPLET) + set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "Target triplet for vcpkg" FORCE) endif() + message(STATUS "Final VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") + # Set ARM64-specific CMake variables set(CMAKE_SYSTEM_PROCESSOR ARM64) if(NOT CMAKE_GENERATOR_PLATFORM) set(CMAKE_GENERATOR_PLATFORM ARM64) endif() + else() + # Debug: Show values for non-ARM64 builds too + message(STATUS "Non-ARM64 build detected") + message(STATUS "CMAKE_SYSTEM_PROCESSOR: '${CMAKE_SYSTEM_PROCESSOR}'") + message(STATUS "CMAKE_GENERATOR_PLATFORM: '${CMAKE_GENERATOR_PLATFORM}'") + message(STATUS "VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") endif() # Always run the vendor packages script - it now handles ARM64 properly From bcea78ff497c5beb39e998bfe757152c00e53452 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 16:27:22 -0400 Subject: [PATCH 28/96] Revert "try adding DCMAKE_PREFIX_PATH on arm windows" This reverts commit a9692f18a15c6a5496fb08e722ae85a0f473484a. --- .github/workflows/node-ci.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index ff915c3d6326..66cd97034436 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -220,7 +220,7 @@ jobs: key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' && matrix.arch == 'x86_64' + if: runner.os == 'Windows' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" @@ -232,20 +232,6 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` -DMLN_WITH_NODE=ON - - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' && matrix.arch == 'arm64' - shell: pwsh - env: - VCPKG_INSTALL_OPTIONS: "--debug" - VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" - run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON ` - -DCMAKE_PREFIX_PATH=${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\installed\\arm64-windows - - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' run: | From be5dc11068a984426188b62e94c229a385748732 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 19:58:53 -0400 Subject: [PATCH 29/96] try to use alternate toolchain for arm64 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 501f4898054b..868fe7cd4100 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,11 @@ if (MLN_WITH_QT AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) endif() if(WIN32 AND NOT DEFINED ENV{MSYSTEM} AND NOT MLN_WITH_QT AND NOT CMAKE_SYSTEM_NAME STREQUAL Android) - set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/custom-toolchain.cmake) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ARM64|aarch64)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "ARM64") + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/arm64-windows-toolchain.cmake) + else() + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/custom-toolchain.cmake) + endif() endif() project("MapLibre Native" LANGUAGES CXX C) From ba0042b958a44ef297dc2f4886c52af5c103fdc3 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 20:46:23 -0400 Subject: [PATCH 30/96] Revert "try to use alternate toolchain for arm64" This reverts commit 2e768c3e95ab21f7df947e47d69d68f06a2babdd. --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 868fe7cd4100..501f4898054b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,11 +35,7 @@ if (MLN_WITH_QT AND NOT CMAKE_OSX_DEPLOYMENT_TARGET) endif() if(WIN32 AND NOT DEFINED ENV{MSYSTEM} AND NOT MLN_WITH_QT AND NOT CMAKE_SYSTEM_NAME STREQUAL Android) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ARM64|aarch64)$" OR CMAKE_GENERATOR_PLATFORM MATCHES "ARM64") - set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/arm64-windows-toolchain.cmake) - else() - set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/custom-toolchain.cmake) - endif() + set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/platform/windows/custom-toolchain.cmake) endif() project("MapLibre Native" LANGUAGES CXX C) From 5f57d1577a69b332e6e761184245eb7573888841 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 20:50:15 -0400 Subject: [PATCH 31/96] add debug to TRIPLETS --- .../vcpkg-custom-triplets/arm64-windows.cmake | 12 +++++++++++ .../vcpkg-custom-triplets/x64-windows.cmake | 21 +++++++++++++++---- .../vcpkg-custom-triplets/x86-windows.cmake | 20 ++++++++++++++---- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake index d19f3d0c1749..ee7fea289ac6 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -1,3 +1,6 @@ +message(STATUS "=== ARM64 TRIPLET LOADED ===") +message(STATUS "Loading custom ARM64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) @@ -8,3 +11,12 @@ set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") # Explicitly set the platform toolset set(VCPKG_PLATFORM_TOOLSET v143) + +message(STATUS "ARM64 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== ARM64 TRIPLET LOADED ===") \ No newline at end of file diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake index 7f709cad6a0b..b401b6c642b8 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake @@ -1,4 +1,17 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) -#set(VCPKG_BUILD_TYPE release) +message(STATUS "=== x64 TRIPLET LOADED ===") +message(STATUS "Loading custom x64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +#set(VCPKG_BUILD_TYPE release) + +message(STATUS "x64 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x64 TRIPLET LOADED ===") + diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake index 79f48d9635c6..5daae36c582a 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake @@ -1,4 +1,16 @@ -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -#set(VCPKG_BUILD_TYPE release) +message(STATUS "=== x86 TRIPLET LOADED ===") +message(STATUS "Loading custom x86 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) +#set(VCPKG_BUILD_TYPE release) + +message(STATUS "x86 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x86 TRIPLET LOADED ===") From 8b78bb785360f3ac19b7eca6560d59ae626412ae Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 21:11:42 -0400 Subject: [PATCH 32/96] set arm64 in workflow --- .github/workflows/node-ci.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 66cd97034436..cd9b622f3957 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -219,8 +219,27 @@ jobs: path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives key: vcpkg-${{ env.VCPKG_COMMIT_ID }} + - name: Setup ARM64 Build Environment + if: runner.os == 'Windows' && matrix.arch == 'arm64' + run: | + # Set up ARM64 cross-compilation environment + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" + # Verify the environment + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd + + - name: Configure maplibre-native (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + run: | + cmake . -B build ` + -G Ninja -A ARM64 ` + -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` + -DMLN_WITH_NODE=ON + shell: pwsh + - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" From d4563236a9929d7153e4b9f133afa6a50dd96111 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 21:24:53 -0400 Subject: [PATCH 33/96] Update node-ci.yml --- .github/workflows/node-ci.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index cd9b622f3957..39dc788c4351 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -146,9 +146,15 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows) - if: runner.os == 'Windows' + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Set up msvc dev cmd (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_arm64 # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - name: Remove Strawberry Perl from PATH (Windows) @@ -222,23 +228,24 @@ jobs: - name: Setup ARM64 Build Environment if: runner.os == 'Windows' && matrix.arch == 'arm64' run: | - # Set up ARM64 cross-compilation environment call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" - # Verify the environment echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd - name: Configure maplibre-native (Windows ARM64) if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | cmake . -B build ` - -G Ninja -A ARM64 ` + -G "Visual Studio 17 2022" -A ARM64 ` -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` -DMLN_WITH_NODE=ON - shell: pwsh - - name: Configure maplibre-native (Windows) + - name: Configure maplibre-native (Windows x64) if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh env: From 708597e9fead3d8ff33d41878337b42cdd7e6bbe Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 21:43:19 -0400 Subject: [PATCH 34/96] Try to install dlfcn-win32 for ARM64 --- .github/workflows/node-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 39dc788c4351..fc5f26add80e 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -232,6 +232,21 @@ jobs: echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd + - name: Install missing ARM64 packages + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + run: | + # Try to install dlfcn-win32 for ARM64 specifically + cd platform/windows/vendor/vcpkg + ./vcpkg install dlfcn-win32:arm64-windows --debug + + # If that fails, try with manifest mode or specific features + if ($LASTEXITCODE -ne 0) { + Write-Host "Attempting alternative installation method..." + ./vcpkg install dlfcn-win32 --triplet arm64-windows --debug --recurse + } + continue-on-error: true # Don't fail the build if this step fails + - name: Configure maplibre-native (Windows ARM64) if: runner.os == 'Windows' && matrix.arch == 'arm64' shell: pwsh From f2a90b55716c71f39d3c408bfa766e01b9b1e81d Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 22:25:39 -0400 Subject: [PATCH 35/96] dlfcn-win32 arm64 fallback --- platform/windows/windows.cmake | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 57361b2d9daa..e2b6981e4bba 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -133,7 +133,32 @@ if(MSVC) find_package(CURL REQUIRED) endif() - find_package(dlfcn-win32 REQUIRED) + if(IS_ARM64_BUILD) + find_package(dlfcn-win32 QUIET) + if(dlfcn-win32_FOUND) + message(STATUS "Found dlfcn-win32 for ARM64") + set(HAVE_DLFCN_WIN32 TRUE) + else() + message(STATUS "dlfcn-win32 not available for ARM64, creating fallback") + set(HAVE_DLFCN_WIN32 FALSE) + + # Create a dummy interface library for ARM64 + add_library(dlfcn-win32-fallback INTERFACE) + add_library(dlfcn-win32::dl ALIAS dlfcn-win32-fallback) + + # Add Windows API libraries that provide LoadLibrary/GetProcAddress + target_link_libraries(dlfcn-win32-fallback INTERFACE kernel32) + + # Define a macro to indicate we're using Windows API directly + target_compile_definitions(dlfcn-win32-fallback INTERFACE + DLFCN_WIN32_NOT_AVAILABLE + USE_WINDOWS_LOADLIBRARY + ) + endif() + else() + find_package(dlfcn-win32 REQUIRED) + set(HAVE_DLFCN_WIN32 TRUE) + endif() find_package(ICU OPTIONAL_COMPONENTS i18n uc) find_package(JPEG REQUIRED) find_package(libuv REQUIRED) From 5d9fafe7d69ff997a2b9d287503793e5eb689784 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 22:26:38 -0400 Subject: [PATCH 36/96] fix tabs to spaces --- platform/windows/windows.cmake | 52 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index e2b6981e4bba..190b99f82b03 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -133,32 +133,32 @@ if(MSVC) find_package(CURL REQUIRED) endif() - if(IS_ARM64_BUILD) - find_package(dlfcn-win32 QUIET) - if(dlfcn-win32_FOUND) - message(STATUS "Found dlfcn-win32 for ARM64") - set(HAVE_DLFCN_WIN32 TRUE) - else() - message(STATUS "dlfcn-win32 not available for ARM64, creating fallback") - set(HAVE_DLFCN_WIN32 FALSE) - - # Create a dummy interface library for ARM64 - add_library(dlfcn-win32-fallback INTERFACE) - add_library(dlfcn-win32::dl ALIAS dlfcn-win32-fallback) - - # Add Windows API libraries that provide LoadLibrary/GetProcAddress - target_link_libraries(dlfcn-win32-fallback INTERFACE kernel32) - - # Define a macro to indicate we're using Windows API directly - target_compile_definitions(dlfcn-win32-fallback INTERFACE - DLFCN_WIN32_NOT_AVAILABLE - USE_WINDOWS_LOADLIBRARY - ) - endif() - else() - find_package(dlfcn-win32 REQUIRED) - set(HAVE_DLFCN_WIN32 TRUE) - endif() + if(IS_ARM64_BUILD) + find_package(dlfcn-win32 QUIET) + if(dlfcn-win32_FOUND) + message(STATUS "Found dlfcn-win32 for ARM64") + set(HAVE_DLFCN_WIN32 TRUE) + else() + message(STATUS "dlfcn-win32 not available for ARM64, creating fallback") + set(HAVE_DLFCN_WIN32 FALSE) + + # Create a dummy interface library for ARM64 + add_library(dlfcn-win32-fallback INTERFACE) + add_library(dlfcn-win32::dl ALIAS dlfcn-win32-fallback) + + # Add Windows API libraries that provide LoadLibrary/GetProcAddress + target_link_libraries(dlfcn-win32-fallback INTERFACE kernel32) + + # Define a macro to indicate we're using Windows API directly + target_compile_definitions(dlfcn-win32-fallback INTERFACE + DLFCN_WIN32_NOT_AVAILABLE + USE_WINDOWS_LOADLIBRARY + ) + endif() + else() + find_package(dlfcn-win32 REQUIRED) + set(HAVE_DLFCN_WIN32 TRUE) + endif() find_package(ICU OPTIONAL_COMPONENTS i18n uc) find_package(JPEG REQUIRED) find_package(libuv REQUIRED) From a69d76287a0faf88468f28713829c76bba1c8b30 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 22:35:00 -0400 Subject: [PATCH 37/96] revert Get-VendorPackages.ps1 --- platform/windows/Get-VendorPackages.ps1 | 223 ++---------------------- 1 file changed, 16 insertions(+), 207 deletions(-) diff --git a/platform/windows/Get-VendorPackages.ps1 b/platform/windows/Get-VendorPackages.ps1 index e07163caf71e..5874a32f1b17 100644 --- a/platform/windows/Get-VendorPackages.ps1 +++ b/platform/windows/Get-VendorPackages.ps1 @@ -1,80 +1,17 @@ param( - [Parameter(Mandatory=$true)][string]$Triplet, - [Parameter(Mandatory=$true)][string]$Renderer, + [Parameter(Mandatory=$true)][string]$Triplet, + [Parameter(Mandatory=$true)][string]$Renderer, [Parameter(Mandatory=$false)][switch]${With-ICU} ) Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) -# Check if this is an ARM64 build -$IsARM64 = $Triplet -match "arm64" - -# Enhanced ARM64 environment setup -if ($IsARM64) { - Write-Host "Setting up ARM64 build environment..." -ForegroundColor Green - - # Set environment variables to help vcpkg with ARM64 detection - $env:VCPKG_FORCE_SYSTEM_BINARIES = '1' - $env:VCPKG_DISABLE_COMPILER_TRACKING = '1' - $env:VCPKG_KEEP_ENV_VARS = 'VCPKG_FORCE_SYSTEM_BINARIES;VCPKG_DISABLE_COMPILER_TRACKING' - - # Find Visual Studio installation with ARM64 tools - $vsInstallPath = $null - $vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - - if (Test-Path $vsWhere) { - $vsInstallPath = & $vsWhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.ARM64 -property installationPath - if ($vsInstallPath) { - Write-Host "Found Visual Studio with ARM64 tools at: $vsInstallPath" -ForegroundColor Green - - # Set up ARM64 cross-compilation environment - $vcvarsPath = Join-Path $vsInstallPath "VC\Auxiliary\Build\vcvarsall.bat" - if (Test-Path $vcvarsPath) { - Write-Host "Setting up ARM64 cross-compilation environment..." -ForegroundColor Yellow - - # Create a temporary batch file to set up environment and run vcpkg - $tempBatch = [System.IO.Path]::GetTempFileName() + ".bat" - $vcpkgScript = @" -@echo off -call "$vcvarsPath" x64_arm64 -set VCPKG_DEFAULT_TRIPLET=$Triplet -set VCPKG_FORCE_SYSTEM_BINARIES=1 -set VCPKG_DISABLE_COMPILER_TRACKING=1 -echo ARM64 environment variables set: -echo VCPKG_DEFAULT_TRIPLET=%VCPKG_DEFAULT_TRIPLET% -echo VCPKG_FORCE_SYSTEM_BINARIES=%VCPKG_FORCE_SYSTEM_BINARIES% -echo VCPKG_DISABLE_COMPILER_TRACKING=%VCPKG_DISABLE_COMPILER_TRACKING% -"@ - Set-Content -Path $tempBatch -Value $vcpkgScript -Encoding ASCII - - # Execute the environment setup - $envOutput = & cmd.exe /c "$tempBatch && set" - Remove-Item $tempBatch -Force - - # Parse and set environment variables from the batch output - foreach ($line in $envOutput) { - if ($line -match '^([^=]+)=(.*)$') { - $name = $matches[1] - $value = $matches[2] - # Only set important environment variables, avoid overriding PowerShell vars - if ($name -in @('PATH', 'INCLUDE', 'LIB', 'LIBPATH', 'VCINSTALLDIR', 'WindowsSDKDir', 'VCPKG_DEFAULT_TRIPLET', 'VCPKG_FORCE_SYSTEM_BINARIES', 'VCPKG_DISABLE_COMPILER_TRACKING')) { - [Environment]::SetEnvironmentVariable($name, $value, 'Process') - } - } - } - Write-Host "ARM64 build environment configured successfully" -ForegroundColor Green - } - } else { - Write-Warning "Visual Studio with ARM64 tools not found. Please install 'MSVC v143 - VS 2022 C++ ARM64 build tools'" - Write-Host "You can install it via Visual Studio Installer > Individual Components > MSVC v143 - VS 2022 C++ ARM64 build tools" -ForegroundColor Yellow - } - } -} - $vcpkg_temp_dir = '***' + foreach($letter in [byte][char]'Z'..[byte][char]'A') { $vcpkg_temp_dir = '{0}:' -f [char]$letter + if(-not (Test-Path $vcpkg_temp_dir)) { & subst $vcpkg_temp_dir ([System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg')) @@ -87,151 +24,23 @@ switch($Renderer) { 'EGL' { $renderer_packages = @('egl', 'opengl-registry'); break } 'OpenGL' { $renderer_packages = @('opengl-registry'); break } - 'Vulkan' { $renderer_packages = @(); break } - 'All' { $renderer_packages = @('egl', 'opengl-registry'); break } + 'Vulkan' { $renderer_packages = @(); break } + 'All' { $renderer_packages = @('egl', 'opengl-registry'); break } } -# Bootstrap vcpkg if needed if(-not (Test-Path ('{0}\vcpkg.exe' -f $vcpkg_temp_dir))) { - Write-Host "Bootstrapping vcpkg..." -ForegroundColor Yellow - $bootstrapResult = & ('{0}\bootstrap-vcpkg.bat' -f $vcpkg_temp_dir) - if ($LASTEXITCODE -ne 0) { - Write-Error "Failed to bootstrap vcpkg" - exit 1 - } + & ('{0}\bootstrap-vcpkg.bat' -f $vcpkg_temp_dir) } -# Prepare vcpkg arguments -$vcpkg_args = @( - '--disable-metrics', - ('--overlay-triplets={0}' -f [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets')), - ('--triplet={0}' -f $Triplet), - '--clean-after-build' +& ('{0}\vcpkg.exe' -f $vcpkg_temp_dir) $( + @( + '--disable-metrics', + ('--overlay-triplets={0}' -f [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets')), + ('--triplet={0}' -f $Triplet), + '--clean-after-build', + 'install', 'curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp' + ) + $renderer_packages + $(if(${With-ICU}) {@('icu')} else {@()}) ) -# ARM64-specific vcpkg configurations -if ($IsARM64) { - Write-Host "Configuring vcpkg for ARM64 build..." -ForegroundColor Yellow - - # Create ARM64-specific triplet if it doesn't exist - $customTripletsDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg-custom-triplets') - $arm64TripletPath = Join-Path $customTripletsDir "arm64-windows-custom.cmake" - - if (-not (Test-Path $customTripletsDir)) { - New-Item -ItemType Directory -Path $customTripletsDir -Force - } - - if (-not (Test-Path $arm64TripletPath)) { - $arm64TripletContent = @" -set(VCPKG_TARGET_ARCHITECTURE arm64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_CMAKE_SYSTEM_NAME Windows) - -# ARM64 specific configurations -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED VCPKG_FORCE_SYSTEM_BINARIES VCPKG_DISABLE_COMPILER_TRACKING) -set(VCPKG_BUILD_TYPE release) - -# Use host tools for cross-compilation -set(VCPKG_CROSSCOMPILING ON) -set(VCPKG_TARGET_IS_WINDOWS ON) -"@ - Set-Content -Path $arm64TripletPath -Value $arm64TripletContent -Encoding UTF8 - Write-Host "Created ARM64 custom triplet at: $arm64TripletPath" -ForegroundColor Green - } - - # Use the custom triplet for ARM64 - if ($Triplet -eq "arm64-windows") { - $vcpkg_args = $vcpkg_args | ForEach-Object { if ($_ -match "--triplet=") { "--triplet=arm64-windows-custom" } else { $_ } } - } - - # Add ARM64-specific flags - $vcpkg_args += @( - '--allow-unsupported', - '--x-install-root=' + [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed') - ) - - Write-Host "Using ARM64 vcpkg arguments: $($vcpkg_args -join ' ')" -ForegroundColor Cyan -} - -$packages = @('install', 'curl', 'dlfcn-win32', 'glfw3', 'libuv', 'libjpeg-turbo', 'libpng', 'libwebp') + $renderer_packages + $(if(${With-ICU}) {@('icu')} else {@()}) - -Write-Host "Installing packages: $($packages[1..($packages.Length-1)] -join ', ')" -ForegroundColor Green -Write-Host "Triplet: $Triplet" -ForegroundColor Green - -try { - # Run vcpkg with all arguments - $vcpkgExe = '{0}\vcpkg.exe' -f $vcpkg_temp_dir - $allArgs = $vcpkg_args + $packages - - Write-Host "Executing: $vcpkgExe $($allArgs -join ' ')" -ForegroundColor Cyan - - & $vcpkgExe $allArgs - - if ($LASTEXITCODE -ne 0) { - if ($IsARM64) { - Write-Host "vcpkg installation failed for ARM64. Attempting workarounds..." -ForegroundColor Yellow - - # Try installing packages one by one for better error diagnosis - foreach ($package in $packages[1..($packages.Length-1)]) { - Write-Host "Attempting to install: $package" -ForegroundColor Yellow - $singlePackageArgs = $vcpkg_args + @('install', $package) - - & $vcpkgExe $singlePackageArgs - - if ($LASTEXITCODE -eq 0) { - Write-Host "Successfully installed: $package" -ForegroundColor Green - } else { - Write-Warning "Failed to install: $package" - - # For critical packages, try alternative approaches - if ($package -in @('curl', 'libuv', 'libpng', 'libjpeg-turbo')) { - Write-Host "Trying to install $package with different options..." -ForegroundColor Yellow - $fallbackArgs = @('--disable-metrics', '--triplet=arm64-windows', '--allow-unsupported', 'install', $package) - & $vcpkgExe $fallbackArgs - - if ($LASTEXITCODE -eq 0) { - Write-Host "Successfully installed $package with fallback method" -ForegroundColor Green - } - } - } - } - } else { - Write-Error "vcpkg installation failed with exit code: $LASTEXITCODE" - exit $LASTEXITCODE - } - } else { - Write-Host "All packages installed successfully!" -ForegroundColor Green - - # Verify ARM64 installation - if ($IsARM64) { - $arm64InstallDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', 'arm64-windows-custom') - if (-not (Test-Path $arm64InstallDir)) { - $arm64InstallDir = [System.IO.Path]::Combine($PWD.Path, 'vendor', 'vcpkg', 'installed', 'arm64-windows') - } - - if (Test-Path $arm64InstallDir) { - Write-Host "ARM64 packages successfully installed at: $arm64InstallDir" -ForegroundColor Green - - # List installed packages for verification - $installedPackages = Get-ChildItem -Path (Join-Path $arm64InstallDir 'share') -Directory | Select-Object -ExpandProperty Name - Write-Host "Installed ARM64 packages: $($installedPackages -join ', ')" -ForegroundColor Green - } - } - } - -} catch { - Write-Error "vcpkg execution failed: $_" - if ($IsARM64) { - Write-Host "This might be due to ARM64 toolchain issues. Please ensure:" -ForegroundColor Yellow - Write-Host "1. Visual Studio 2022 with ARM64 build tools is installed" -ForegroundColor Yellow - Write-Host "2. Windows SDK 10.0.19041.0 or later is installed" -ForegroundColor Yellow - Write-Host "3. CMake 3.20 or later is installed" -ForegroundColor Yellow - } - throw -} finally { - subst $vcpkg_temp_dir /D -} - -Write-Host "Package installation completed!" -ForegroundColor Green +subst $vcpkg_temp_dir /D From a3d77d04a44e2bd940cd939a805f3841a90caa36 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 23:10:02 -0400 Subject: [PATCH 38/96] revert windows.cmake --- platform/windows/windows.cmake | 203 +-------------------------------- 1 file changed, 3 insertions(+), 200 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 190b99f82b03..b4a3aba62863 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -11,64 +11,7 @@ if(MSVC) set(WITH_ICU -With-ICU) endif() - # Determine if this is an ARM64 build - set(IS_ARM64_BUILD FALSE) - if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|ARM64)$" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") - set(IS_ARM64_BUILD TRUE) - message(STATUS "Configuring for ARM64 build") - - # Debug: Show what VCPKG_TARGET_TRIPLET was set to - message(STATUS "Current VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") - message(STATUS "CMAKE_SYSTEM_PROCESSOR: '${CMAKE_SYSTEM_PROCESSOR}'") - message(STATUS "CMAKE_GENERATOR_PLATFORM: '${CMAKE_GENERATOR_PLATFORM}'") - - # Force ARM64 triplet regardless of what was set before - if(VCPKG_TARGET_TRIPLET AND NOT VCPKG_TARGET_TRIPLET MATCHES "arm64") - message(WARNING "VCPKG_TARGET_TRIPLET was set to '${VCPKG_TARGET_TRIPLET}' but this is an ARM64 build. Overriding to 'arm64-windows'") - set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "Target triplet for vcpkg" FORCE) - elseif(NOT VCPKG_TARGET_TRIPLET) - set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "Target triplet for vcpkg" FORCE) - endif() - - message(STATUS "Final VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") - - # Set ARM64-specific CMake variables - set(CMAKE_SYSTEM_PROCESSOR ARM64) - if(NOT CMAKE_GENERATOR_PLATFORM) - set(CMAKE_GENERATOR_PLATFORM ARM64) - endif() - else() - # Debug: Show values for non-ARM64 builds too - message(STATUS "Non-ARM64 build detected") - message(STATUS "CMAKE_SYSTEM_PROCESSOR: '${CMAKE_SYSTEM_PROCESSOR}'") - message(STATUS "CMAKE_GENERATOR_PLATFORM: '${CMAKE_GENERATOR_PLATFORM}'") - message(STATUS "VCPKG_TARGET_TRIPLET: '${VCPKG_TARGET_TRIPLET}'") - endif() - - # Always run the vendor packages script - it now handles ARM64 properly - message(STATUS "Installing vendor packages for triplet: ${VCPKG_TARGET_TRIPLET}") - execute_process( - COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU} - RESULT_VARIABLE VCPKG_RESULT - OUTPUT_VARIABLE VCPKG_OUTPUT - ERROR_VARIABLE VCPKG_ERROR - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} - ) - - if(NOT VCPKG_RESULT EQUAL 0) - message(WARNING "vcpkg package installation had issues:") - message(WARNING "Output: ${VCPKG_OUTPUT}") - message(WARNING "Error: ${VCPKG_ERROR}") - if(IS_ARM64_BUILD) - message(STATUS "This is expected for ARM64 builds due to limited package availability") - message(STATUS "Continuing with available packages...") - else() - message(FATAL_ERROR "Failed to install required packages") - endif() - else() - message(STATUS "Successfully installed vendor packages") - endif() - + execute_process(COMMAND powershell -ExecutionPolicy Bypass -File ${CMAKE_CURRENT_LIST_DIR}/Get-VendorPackages.ps1 -Triplet ${VCPKG_TARGET_TRIPLET} -Renderer ${_RENDERER} ${WITH_ICU}) unset(_RENDERER) add_compile_definitions(NOMINMAX GHC_WIN_DISABLE_WSTRING_STORAGE_TYPE) @@ -79,154 +22,15 @@ if(MSVC) /MP ) - # ARM64-specific compiler options - if(IS_ARM64_BUILD) - message(STATUS "Adding ARM64-specific compiler options") - target_compile_options( - mbgl-compiler-options - INTERFACE - $<$:/bigobj> # Handle large object files - $<$:/EHsc> # Exception handling - $<$:/TC> # Treat .c files as C - $<$:/TP> # Treat .cpp files as C++ - ) - - # Set up ARM64 cross-compilation paths - set(ARM64_VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed") - - # Check for custom ARM64 triplet first, then standard - if(EXISTS "${ARM64_VCPKG_ROOT}/arm64-windows-custom") - set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/arm64-windows-custom") - message(STATUS "Using ARM64 custom triplet packages at: ${ARM64_INSTALL_PATH}") - elseif(EXISTS "${ARM64_VCPKG_ROOT}/arm64-windows") - set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/arm64-windows") - message(STATUS "Using ARM64 standard triplet packages at: ${ARM64_INSTALL_PATH}") - else() - message(WARNING "ARM64 packages not found, using x64 fallback") - set(ARM64_INSTALL_PATH "${ARM64_VCPKG_ROOT}/x64-windows") - endif() - - # Set CMAKE_PREFIX_PATH for ARM64 - list(PREPEND CMAKE_PREFIX_PATH "${ARM64_INSTALL_PATH}") - message(STATUS "Added ARM64 package path to CMAKE_PREFIX_PATH: ${ARM64_INSTALL_PATH}") - endif() - - # Find packages with ARM64 awareness - if(IS_ARM64_BUILD) - # For ARM64, we might need to be more flexible with package finding - find_package(CURL QUIET) - if(NOT CURL_FOUND) - message(STATUS "CURL not found via find_package, trying manual detection for ARM64") - find_path(CURL_INCLUDE_DIR curl/curl.h PATHS "${ARM64_INSTALL_PATH}/include") - find_library(CURL_LIBRARY NAMES curl libcurl PATHS "${ARM64_INSTALL_PATH}/lib" "${ARM64_INSTALL_PATH}/debug/lib") - if(CURL_INCLUDE_DIR AND CURL_LIBRARY) - set(CURL_FOUND TRUE) - add_library(CURL::libcurl UNKNOWN IMPORTED) - set_target_properties(CURL::libcurl PROPERTIES - IMPORTED_LOCATION "${CURL_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIR}") - set(CURL_LIBRARIES CURL::libcurl) - message(STATUS "Found CURL manually for ARM64: ${CURL_LIBRARY}") - endif() - endif() - else() - find_package(CURL REQUIRED) - endif() - - if(IS_ARM64_BUILD) - find_package(dlfcn-win32 QUIET) - if(dlfcn-win32_FOUND) - message(STATUS "Found dlfcn-win32 for ARM64") - set(HAVE_DLFCN_WIN32 TRUE) - else() - message(STATUS "dlfcn-win32 not available for ARM64, creating fallback") - set(HAVE_DLFCN_WIN32 FALSE) - - # Create a dummy interface library for ARM64 - add_library(dlfcn-win32-fallback INTERFACE) - add_library(dlfcn-win32::dl ALIAS dlfcn-win32-fallback) - - # Add Windows API libraries that provide LoadLibrary/GetProcAddress - target_link_libraries(dlfcn-win32-fallback INTERFACE kernel32) - - # Define a macro to indicate we're using Windows API directly - target_compile_definitions(dlfcn-win32-fallback INTERFACE - DLFCN_WIN32_NOT_AVAILABLE - USE_WINDOWS_LOADLIBRARY - ) - endif() - else() - find_package(dlfcn-win32 REQUIRED) - set(HAVE_DLFCN_WIN32 TRUE) - endif() + find_package(CURL REQUIRED) + find_package(dlfcn-win32 REQUIRED) find_package(ICU OPTIONAL_COMPONENTS i18n uc) find_package(JPEG REQUIRED) find_package(libuv REQUIRED) find_package(PNG REQUIRED) find_package(WebP REQUIRED) - - # ARM64-specific package fixes - if(IS_ARM64_BUILD) - message(STATUS "Applying ARM64-specific package fixes") - - # Simplify library targets for ARM64 compatibility - if(TARGET JPEG::JPEG) - set(JPEG_LIBRARIES JPEG::JPEG) - elseif(JPEG_LIBRARIES) - # Create target if it doesn't exist - add_library(JPEG::JPEG UNKNOWN IMPORTED) - set_target_properties(JPEG::JPEG PROPERTIES IMPORTED_LOCATION "${JPEG_LIBRARIES}") - endif() - - if(TARGET PNG::PNG) - set(PNG_LIBRARIES PNG::PNG) - elseif(PNG_LIBRARIES) - add_library(PNG::PNG UNKNOWN IMPORTED) - set_target_properties(PNG::PNG PROPERTIES IMPORTED_LOCATION "${PNG_LIBRARIES}") - endif() - - if(TARGET WebP::webp) - set(WEBP_LIBRARIES WebP::webp) - elseif(TARGET WebP::WebP) - set(WEBP_LIBRARIES WebP::WebP) - elseif(WEBP_LIBRARIES) - add_library(WebP::webp UNKNOWN IMPORTED) - set_target_properties(WebP::webp PROPERTIES IMPORTED_LOCATION "${WEBP_LIBRARIES}") - set(WEBP_LIBRARIES WebP::webp) - endif() - - # Handle ICU targets for ARM64 - if(ICU_FOUND) - if(NOT TARGET ICU::data AND (TARGET ICU::uc OR TARGET ICU::i18n)) - add_library(ICU::data INTERFACE IMPORTED) - message(STATUS "Created ICU::data interface target for ARM64") - endif() - else() - message(STATUS "ICU not found for ARM64, will use builtin ICU") - set(MLN_USE_BUILTIN_ICU TRUE) - endif() - - # Handle libuv target normalization - if(TARGET libuv::uv_a) - set(LIBUV_LIBRARIES libuv::uv_a) - elseif(TARGET libuv::uv) - set(LIBUV_LIBRARIES libuv::uv) - elseif(TARGET uv_a) - set(LIBUV_LIBRARIES uv_a) - elseif(TARGET uv) - set(LIBUV_LIBRARIES uv) - endif() - - # Set up include directories for ARM64 - if(EXISTS "${ARM64_INSTALL_PATH}/include") - include_directories("${ARM64_INSTALL_PATH}/include") - message(STATUS "Added ARM64 include directory: ${ARM64_INSTALL_PATH}/include") - endif() - endif() - find_path(DLFCN_INCLUDE_DIRS dlfcn.h) find_path(LIBUV_INCLUDE_DIRS uv.h) - elseif(DEFINED ENV{MSYSTEM}) set(MSYS 1) set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") @@ -247,7 +51,6 @@ else() message(FATAL_ERROR "Unsupported build system: " ${CMAKE_SYSTEM_NAME}) endif() -# Rest of your existing configuration... target_sources( mbgl-core PRIVATE From 0950de09989f8cc6aafdfc44a7ea003343863e5a Mon Sep 17 00:00:00 2001 From: acalcutt Date: Tue, 26 Aug 2025 23:37:40 -0400 Subject: [PATCH 39/96] set NODE_MODULE_MINIMUM_ABI 115 (node v20) --- platform/node/CMakeLists.txt | 2 +- platform/node/scripts/publish.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/node/CMakeLists.txt b/platform/node/CMakeLists.txt index c6afee8484b1..31eb7fbb72c0 100644 --- a/platform/node/CMakeLists.txt +++ b/platform/node/CMakeLists.txt @@ -1,4 +1,4 @@ -set(NODE_MODULE_MINIMUM_ABI 83) # Minimum supported Node.js version: 14 +set(NODE_MODULE_MINIMUM_ABI 115) # Minimum supported Node.js version: 20 set(NODE_MODULE_CACHE_DIR ${CMAKE_BINARY_DIR}/headers) if(DEFINED ENV{MSYSTEM}) diff --git a/platform/node/scripts/publish.sh b/platform/node/scripts/publish.sh index ab7a660e3bdf..1a7cbf2e0a3d 100755 --- a/platform/node/scripts/publish.sh +++ b/platform/node/scripts/publish.sh @@ -9,7 +9,7 @@ if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" # Changes to the version targets here should happen in tandem with updates to the # EXCLUDE_NODE_ABIS property in cmake/node.cmake and the "node" engines property in # package.json. - for TARGET in 18.0.0 20.0.0 22.0.0 24.0.0; do + for TARGET in 20.0.0 22.0.0 24.0.0; do rm -rf build/stage if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then From c7778df273cf812a46f2ee72cedec6ac17ec060b Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 00:11:43 -0400 Subject: [PATCH 40/96] try to fix < 3.10 warning --- platform/node/cmake/module.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/cmake/module.cmake b/platform/node/cmake/module.cmake index 0f320c5be60d..61f558d44881 100644 --- a/platform/node/cmake/module.cmake +++ b/platform/node/cmake/module.cmake @@ -1,6 +1,6 @@ # We need CMake 3.9 because the Xcode generator doesn't know about systems include paths before 3.9. # See https://gitlab.kitware.com/cmake/cmake/issues/16795 -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.10) if (NOT NODE_MODULE_MINIMUM_ABI) set(NODE_MODULE_MINIMUM_ABI 46) # Don't build node modules for versions earlier than Node 4 From 8296b7a18b1aa16648b8e6c99e163c3beb35152d Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 00:12:45 -0400 Subject: [PATCH 41/96] remove unneeded workflow, try to use ninja again --- .github/workflows/node-ci.yml | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index fc5f26add80e..8b2bf0de2b22 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -232,36 +232,8 @@ jobs: echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd - - name: Install missing ARM64 packages - if: runner.os == 'Windows' && matrix.arch == 'arm64' - shell: pwsh - run: | - # Try to install dlfcn-win32 for ARM64 specifically - cd platform/windows/vendor/vcpkg - ./vcpkg install dlfcn-win32:arm64-windows --debug - - # If that fails, try with manifest mode or specific features - if ($LASTEXITCODE -ne 0) { - Write-Host "Attempting alternative installation method..." - ./vcpkg install dlfcn-win32 --triplet arm64-windows --debug --recurse - } - continue-on-error: true # Don't fail the build if this step fails - - - name: Configure maplibre-native (Windows ARM64) - if: runner.os == 'Windows' && matrix.arch == 'arm64' - shell: pwsh - env: - VCPKG_INSTALL_OPTIONS: "--debug" - VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" - run: | - cmake . -B build ` - -G "Visual Studio 17 2022" -A ARM64 ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON - - name: Configure maplibre-native (Windows x64) - if: runner.os == 'Windows' && matrix.arch == 'x86_64' + if: runner.os == 'Windows' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" From 2e95fd388f3d2ea530893c2a8c60e0c00f7fb167 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 00:33:42 -0400 Subject: [PATCH 42/96] try to get test to pass on arm64 --- .github/workflows/node-ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 8b2bf0de2b22..e0478cf23685 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -279,8 +279,8 @@ jobs: working-directory: platform/node run: npm test - - name: Test (Windows) - if: runner.os == 'Windows' + - name: Test (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh working-directory: platform/node env: @@ -291,6 +291,17 @@ jobs: & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll npm test + - name: Test (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + working-directory: platform/node + env: + LIBGL_ALWAYS_SOFTWARE: true + GALLIUM_DRIVER: llvmpipe + run: | + (Invoke-WebRequest https://api.github.com/repos/mmozeiko/build-mesa/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa-llvmpipe-arm64-.+\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z } + & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z opengl32.dll libGLESv2.dll + npm test # On PRs make sure that the npm package can be packaged. - name: Pack working-directory: platform/node From 326f105ae67249e341fb7f0eb6800154261a3ad7 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 08:37:11 -0400 Subject: [PATCH 43/96] try to simplify msvc dev cmd, test VSCMD_ARG_TGT_ARCH --- .github/workflows/node-ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index e0478cf23685..ee47608241a4 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -146,12 +146,8 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows x64) - if: runner.os == 'Windows' && matrix.arch == 'x86_64' - uses: ilammy/msvc-dev-cmd@v1 - - name: Set up msvc dev cmd (Windows ARM64) - if: runner.os == 'Windows' && matrix.arch == 'arm64' + if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64_arm64 @@ -225,9 +221,16 @@ jobs: path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives key: vcpkg-${{ env.VCPKG_COMMIT_ID }} + - name: Test VSCMD_ARG_TGT_ARCH Environment + if: runner.os == 'Windows' && matrix.arch == 'arm64' + run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd + - name: Setup ARM64 Build Environment if: runner.os == 'Windows' && matrix.arch == 'arm64' run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd From 72795a8fbce807855e34611be5dad419264117cf Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 08:42:44 -0400 Subject: [PATCH 44/96] Update node-ci.yml --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index ee47608241a4..a6c28e709a02 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -222,7 +222,7 @@ jobs: key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - name: Test VSCMD_ARG_TGT_ARCH Environment - if: runner.os == 'Windows' && matrix.arch == 'arm64' + if: runner.os == 'Windows' run: | echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd From 376035c467a4ba4ecf8b4d5c017b4e09a5d2de94 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 08:54:10 -0400 Subject: [PATCH 45/96] try removing 'Setup ARM64 Build Environment' --- .github/workflows/node-ci.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index a6c28e709a02..773ae8f08bee 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -146,12 +146,23 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + uses: ilammy/msvc-dev-cmd@v1 + - name: Set up msvc dev cmd (Windows ARM64) - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.arch == 'arm64' uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64_arm64 + + - name: Test VSCMD_ARG_TGT_ARCH Environment + if: runner.os == 'Windows' + run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd + # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - name: Remove Strawberry Perl from PATH (Windows) if: runner.os == 'Windows' @@ -221,20 +232,6 @@ jobs: path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - - name: Test VSCMD_ARG_TGT_ARCH Environment - if: runner.os == 'Windows' - run: | - echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" - shell: cmd - - - name: Setup ARM64 Build Environment - if: runner.os == 'Windows' && matrix.arch == 'arm64' - run: | - echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" - echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" - shell: cmd - - name: Configure maplibre-native (Windows x64) if: runner.os == 'Windows' shell: pwsh From 0ad051d95ab4600f91cc2190a922ae54aac5bdb8 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 08:54:41 -0400 Subject: [PATCH 46/96] try removing old workaround --- .github/workflows/node-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 773ae8f08bee..6c1bb881f10a 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -163,14 +163,6 @@ jobs: echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" shell: cmd - # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - - name: Remove Strawberry Perl from PATH (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" - "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: cmake version run: | cmake --version From 7d61c6473782040484a91c58f30d638a7c047df6 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 09:09:31 -0400 Subject: [PATCH 47/96] adjust presets --- .github/workflows/node-ci.yml | 7 +------ CMakePresets.json | 14 ++++++++++++-- platform/windows/arm64-windows-toolchain.cmake | 11 ----------- 3 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 platform/windows/arm64-windows-toolchain.cmake diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 6c1bb881f10a..e232f5334523 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -156,7 +156,6 @@ jobs: with: arch: amd64_arm64 - - name: Test VSCMD_ARG_TGT_ARCH Environment if: runner.os == 'Windows' run: | @@ -231,11 +230,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON + cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index d99c6f4b2166..a787cb63e3d9 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -194,8 +194,7 @@ "MLN_WITH_OPENGL": "OFF", "MLN_WITH_EGL": "OFF", "MLN_WITH_VULKAN": "OFF", - "MLN_WITH_GLFW": "OFF", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/platform/windows/arm64-windows-toolchain.cmake" + "MLN_WITH_GLFW": "OFF" } }, { @@ -219,6 +218,17 @@ "MLN_WITH_VULKAN": "ON", "MLN_WITH_GLFW": "ON" } + }, + { + "name": "windows-node", + "hidden": false, + "inherits": "windows", + "displayName": "Windows Node", + "description": "Windows Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache", + } } ], "buildPresets": [ diff --git a/platform/windows/arm64-windows-toolchain.cmake b/platform/windows/arm64-windows-toolchain.cmake deleted file mode 100644 index dbdffaf806d0..000000000000 --- a/platform/windows/arm64-windows-toolchain.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Minimal ARM64 Windows toolchain for MapLibre Native - -# Set vcpkg for ARM64 -set(VCPKG_TARGET_TRIPLET "arm64-windows" CACHE STRING "") -set(VCPKG_OVERLAY_TRIPLETS ${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg-custom-triplets) - -# Include the base vcpkg toolchain first -include(${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/scripts/buildsystems/vcpkg.cmake) - -# Ensure ARM64 packages are found by adding to CMAKE_PREFIX_PATH after vcpkg toolchain -list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/vendor/vcpkg/installed/arm64-windows") From 44790ef2edca987336a6fa8933c7840bc0c091a5 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 09:19:06 -0400 Subject: [PATCH 48/96] try to fix syntax --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index a787cb63e3d9..ecdde442f2fa 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -227,7 +227,7 @@ "description": "Windows Node build (OpenGL renderer)", "cacheVariables": { "MLN_WITH_OPENGL": "ON", - "CMAKE_CXX_COMPILER_LAUNCHER": "sccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" } } ], From 465745ccffee8e058405938c07a3e3903b76d783 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 09:27:35 -0400 Subject: [PATCH 49/96] try to fix pre-commit --- .github/actionlint.yaml | 21 ++++++------ .../vcpkg-custom-triplets/arm64-windows.cmake | 2 +- .../vcpkg-custom-triplets/x64-windows.cmake | 33 +++++++++---------- .../vcpkg-custom-triplets/x86-windows.cmake | 32 +++++++++--------- 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 5a690e9a9dc8..92c8a0f609bf 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,11 +1,10 @@ -self-hosted-runner: - # Labels of self-hosted runner in array of strings. - labels: - - macos-14 # can be removed once actionlint is updated - - ubuntu-24.04 # can be removed once actionlint is updated - - MapLibre_Native_Ubuntu_22_04_ARM_8_core - - MapLibre_Native_Ubuntu_24_04_x84_16_core -# Configuration variables in array of strings defined in your repository or -# organization. `null` means disabling configuration variables check. -# Empty array means no configuration variable is allowed. -config-variables: null +self-hosted-runner: + # Labels of self-hosted runner in array of strings. + labels: + - windows-11-arm # can be removed once actionlint is updated + - MapLibre_Native_Ubuntu_22_04_ARM_8_core + - MapLibre_Native_Ubuntu_24_04_x84_16_core +# Configuration variables in array of strings defined in your repository or +# organization. `null` means disabling configuration variables check. +# Empty array means no configuration variable is allowed. +config-variables: null diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake index ee7fea289ac6..f6c53e07a850 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -19,4 +19,4 @@ message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") -message(STATUS "=== ARM64 TRIPLET LOADED ===") \ No newline at end of file +message(STATUS "=== ARM64 TRIPLET LOADED ===") diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake index b401b6c642b8..bc75f8ab76ce 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake @@ -1,17 +1,16 @@ -message(STATUS "=== x64 TRIPLET LOADED ===") -message(STATUS "Loading custom x64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") - -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE static) -#set(VCPKG_BUILD_TYPE release) - -message(STATUS "x64 Triplet Settings:") -message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") -message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") -message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") -message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") -message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") -message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") -message(STATUS "=== x64 TRIPLET LOADED ===") - +message(STATUS "=== x64 TRIPLET LOADED ===") +message(STATUS "Loading custom x64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +#set(VCPKG_BUILD_TYPE release) + +message(STATUS "x64 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x64 TRIPLET LOADED ===") diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake index 5daae36c582a..b976f98685d6 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake @@ -1,16 +1,16 @@ -message(STATUS "=== x86 TRIPLET LOADED ===") -message(STATUS "Loading custom x86 triplet from: ${CMAKE_CURRENT_LIST_FILE}") - -set(VCPKG_TARGET_ARCHITECTURE x86) -set(VCPKG_CRT_LINKAGE static) -set(VCPKG_LIBRARY_LINKAGE static) -#set(VCPKG_BUILD_TYPE release) - -message(STATUS "x86 Triplet Settings:") -message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") -message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") -message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") -message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") -message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") -message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") -message(STATUS "=== x86 TRIPLET LOADED ===") +message(STATUS "=== x86 TRIPLET LOADED ===") +message(STATUS "Loading custom x86 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + +set(VCPKG_TARGET_ARCHITECTURE x86) +set(VCPKG_CRT_LINKAGE static) +set(VCPKG_LIBRARY_LINKAGE static) +#set(VCPKG_BUILD_TYPE release) + +message(STATUS "x86 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x86 TRIPLET LOADED ===") From 2a503ce3b088d66dde5361142979001fa49db5a8 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 09:31:42 -0400 Subject: [PATCH 50/96] Update actionlint.yaml --- .github/actionlint.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 92c8a0f609bf..5f99dbfd2cbd 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,10 +1,10 @@ -self-hosted-runner: - # Labels of self-hosted runner in array of strings. - labels: - - windows-11-arm # can be removed once actionlint is updated - - MapLibre_Native_Ubuntu_22_04_ARM_8_core - - MapLibre_Native_Ubuntu_24_04_x84_16_core -# Configuration variables in array of strings defined in your repository or -# organization. `null` means disabling configuration variables check. -# Empty array means no configuration variable is allowed. -config-variables: null +self-hosted-runner: + # Labels of self-hosted runner in array of strings. + labels: + - windows-11-arm # can be removed once actionlint is updated + - MapLibre_Native_Ubuntu_22_04_ARM_8_core + - MapLibre_Native_Ubuntu_24_04_x84_16_core +# Configuration variables in array of strings defined in your repository or +# organization. `null` means disabling configuration variables check. +# Empty array means no configuration variable is allowed. +config-variables: null From 6d750772806e30079773248939a48d3a6a993f87 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 09:44:16 -0400 Subject: [PATCH 51/96] try to get preset working --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index e232f5334523..dab4a988f321 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -230,7 +230,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake . -B build --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' From 6d1d9c16a28114d02869f9e00c727adfbafd96e2 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 10:10:26 -0400 Subject: [PATCH 52/96] try to use presets for linux,change windows preset --- .github/workflows/node-ci.yml | 9 ++------- CMakePresets.json | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index dab4a988f321..b4f86e7968f9 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -202,12 +202,7 @@ jobs: - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' run: | - cmake . -B build \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DMLN_WITH_NODE=ON + cmake --preset linux-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Get vcpkg commit id if: runner.os == 'Windows' @@ -230,7 +225,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake . -B build --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index ecdde442f2fa..a2ded85f9dbc 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -63,6 +63,8 @@ "name": "macos-node", "inherits": "macos", "binaryDir": "${sourceDir}/build", + "displayName": "MacOS Node", + "description": "MacOS Node build (Metal renderer)", "cacheVariables": { "MLN_WITH_NODE": "ON", "MLN_WITH_WERROR": "OFF", @@ -116,6 +118,19 @@ "MLN_WITH_X11": "ON" } }, + { + "name": "linux-node", + "inherits": "linux", + "binaryDir": "${sourceDir}/build", + "generator": "Ninja", + "displayName": "Linux Node", + "description": "Linux Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" + } + }, { "name": "windows", "hidden": true, @@ -221,11 +236,12 @@ }, { "name": "windows-node", - "hidden": false, "inherits": "windows", + "binaryDir": "${sourceDir}/build", "displayName": "Windows Node", "description": "Windows Node build (OpenGL renderer)", "cacheVariables": { + "MLN_WITH_NODE": "ON", "MLN_WITH_OPENGL": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" } From 8f3645e5a810333297f0cbbf965327180c807334 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 10:22:49 -0400 Subject: [PATCH 53/96] turn off MLN_WITH_WAYLAND --- CMakePresets.json | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakePresets.json b/CMakePresets.json index a2ded85f9dbc..7c0c84ff9d2f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -128,6 +128,7 @@ "cacheVariables": { "MLN_WITH_NODE": "ON", "MLN_WITH_OPENGL": "ON", + "MLN_WITH_WAYLAND": "OFF", "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" } }, From d9893be531b84e9376fed131e2380cabba8d8c0b Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 10:48:44 -0400 Subject: [PATCH 54/96] try to turn on MLN_WITH_X11 --- CMakePresets.json | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakePresets.json b/CMakePresets.json index 7c0c84ff9d2f..74337bc6bdce 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -129,6 +129,7 @@ "MLN_WITH_NODE": "ON", "MLN_WITH_OPENGL": "ON", "MLN_WITH_WAYLAND": "OFF", + "MLN_WITH_X11": "ON" "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" } }, From c158f6cdab2f395b75ff870bc7da398431ed2644 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 10:48:57 -0400 Subject: [PATCH 55/96] bump node version to 24 --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 409940768f2a..a45fd52cc589 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -23 +24 From 641742b66415fcd56874c196d6c924f503359d1d Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 10:56:13 -0400 Subject: [PATCH 56/96] syntax fix --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 74337bc6bdce..3452121f8459 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -129,7 +129,7 @@ "MLN_WITH_NODE": "ON", "MLN_WITH_OPENGL": "ON", "MLN_WITH_WAYLAND": "OFF", - "MLN_WITH_X11": "ON" + "MLN_WITH_X11": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" } }, From 270a98db4c8d8cb44be13560d448cc27cc6a7d0b Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 11:05:49 -0400 Subject: [PATCH 57/96] Revert "bump node version to 24" This reverts commit eda2db9e1c5e098c8daa79af73a1e6b79ae465f5. --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index a45fd52cc589..409940768f2a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -24 +23 From c4008520190f2a2c32539825817a4603f6107c25 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 11:06:23 -0400 Subject: [PATCH 58/96] Update .nvmrc --- platform/node/.nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/.nvmrc b/platform/node/.nvmrc index 409940768f2a..a45fd52cc589 100644 --- a/platform/node/.nvmrc +++ b/platform/node/.nvmrc @@ -1 +1 @@ -23 +24 From 914381cea9e5d4983861b6802c672f46fe18bc53 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 11:16:23 -0400 Subject: [PATCH 59/96] Update README.md --- platform/node/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/node/README.md b/platform/node/README.md index 2e61182b1cad..d73a633ada3e 100644 --- a/platform/node/README.md +++ b/platform/node/README.md @@ -8,10 +8,10 @@ Binaries are available and downloaded during install for the following platforms: - Operating systems: - - Ubuntu 22.04 (amd64/arm64) - - macOS 12 (amd64/arm64) - - Windows (amd64) -- Node.js 18, 20, 22 + - Ubuntu 24.04 (amd64/arm64) + - macOS (amd64/arm64) + - Windows (amd64/arm64) +- Node.js 20, 22, 24 Run: From b06f34f9140f0eac534e700f7a522bc89404fc36 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 11:57:03 -0400 Subject: [PATCH 60/96] Revert "Update .nvmrc" This reverts commit 4c20b223506ebcaf3b4c7d96dc95ad177768518d. --- platform/node/.nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/.nvmrc b/platform/node/.nvmrc index a45fd52cc589..409940768f2a 100644 --- a/platform/node/.nvmrc +++ b/platform/node/.nvmrc @@ -1 +1 @@ -24 +23 From 058c46c774c9898200e78e7e979c700d34a2b5ca Mon Sep 17 00:00:00 2001 From: acalcutt Date: Wed, 27 Aug 2025 12:51:51 -0400 Subject: [PATCH 61/96] Update node-ci.yml --- .github/workflows/node-ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index b4f86e7968f9..660829fc9b06 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -225,7 +225,11 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake . -B build ` + -G Ninja ` + -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` + -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` + -DMLN_WITH_NODE=ON - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' From 2638a4eff4393b72155289af2bfb00233ebfd8cf Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 10:39:07 -0400 Subject: [PATCH 62/96] try separate windows-node-arm64 preset --- .github/workflows/node-ci.yml | 18 +++++++++++------- CMakePresets.json | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index f0682c13b1fa..6c4e1d6b7a2f 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -219,18 +219,22 @@ jobs: key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - name: Configure maplibre-native (Windows x64) - if: runner.os == 'Windows' + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + + - name: Configure maplibre-native (Windows arm64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON ` - -DMLN_WITH_OPENGL=ON + cmake --preset windows-node-arm64 -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index 3452121f8459..6266f1db4daf 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -247,6 +247,21 @@ "MLN_WITH_OPENGL": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" } + }, + { + "name": "windows-node-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" + } } ], "buildPresets": [ From 0f2a4cff63d7265c7131777ce75c2ab22ca9d5b2 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 10:49:31 -0400 Subject: [PATCH 63/96] see if removing hidden make preset found --- CMakePresets.json | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 6266f1db4daf..92d013ad9121 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -250,7 +250,6 @@ }, { "name": "windows-node-arm64", - "hidden": true, "generator": "Visual Studio 17 2022", "architecture": { "value": "ARM64", From 69a5f67f031f06e209f2080b7df113df1b5b8180 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 10:59:20 -0400 Subject: [PATCH 64/96] more workflow fixes --- .github/workflows/node-ci.yml | 18 +++++++++--------- CMakePresets.json | 5 ++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 6c4e1d6b7a2f..1f14b1cd294e 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -170,22 +170,22 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@v1 with: - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@v1 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} - name: Cache cmake-node-module deps uses: actions/cache@v4 @@ -234,7 +234,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-node-arm64 -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-arm64-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index 92d013ad9121..04e0f9b57610 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -249,12 +249,15 @@ } }, { - "name": "windows-node-arm64", + "name": "windows-arm64-node", + "binaryDir": "${sourceDir}/build", "generator": "Visual Studio 17 2022", "architecture": { "value": "ARM64", "strategy": "set" }, + "displayName": "Windows ARM64 Node", + "description": "Windows ARM64 Node build (OpenGL renderer)", "cacheVariables": { "CMAKE_SYSTEM_NAME": "Windows", "MLN_WITH_NODE": "ON", From b921f908ef24a6eed3de18ad8b8802a333ca0bca Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 11:46:43 -0400 Subject: [PATCH 65/96] try to format preset names better, fix inherits --- .github/workflows/node-ci.yml | 8 ++++---- CMakePresets.json | 16 +++++----------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 1f14b1cd294e..71d6e5537415 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -197,12 +197,12 @@ jobs: - name: Configure maplibre-native (MacOS) if: runner.os == 'MacOS' run: | - cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' run: | - cmake --preset linux-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Get vcpkg commit id if: runner.os == 'Windows' @@ -225,7 +225,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Configure maplibre-native (Windows arm64) if: runner.os == 'Windows' && matrix.arch == 'arm64' @@ -234,7 +234,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-arm64-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-opengl-arm64-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index 04e0f9b57610..d9fe2ccccf4b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -60,7 +60,7 @@ "inherits": "macos-vulkan" }, { - "name": "macos-node", + "name": "macos-metal-node", "inherits": "macos", "binaryDir": "${sourceDir}/build", "displayName": "MacOS Node", @@ -119,10 +119,9 @@ } }, { - "name": "linux-node", + "name": "linux-opengl-node", "inherits": "linux", "binaryDir": "${sourceDir}/build", - "generator": "Ninja", "displayName": "Linux Node", "description": "Linux Node build (OpenGL renderer)", "cacheVariables": { @@ -237,7 +236,7 @@ } }, { - "name": "windows-node", + "name": "windows-opengl-node", "inherits": "windows", "binaryDir": "${sourceDir}/build", "displayName": "Windows Node", @@ -249,17 +248,12 @@ } }, { - "name": "windows-arm64-node", + "name": "windows-arm64-opengl-node", "binaryDir": "${sourceDir}/build", - "generator": "Visual Studio 17 2022", - "architecture": { - "value": "ARM64", - "strategy": "set" - }, + "inherits": "windows-arm64", "displayName": "Windows ARM64 Node", "description": "Windows ARM64 Node build (OpenGL renderer)", "cacheVariables": { - "CMAKE_SYSTEM_NAME": "Windows", "MLN_WITH_NODE": "ON", "MLN_WITH_OPENGL": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" From 2f110ee4678c6c2b0ccd0004eb1915d9e8cb11c4 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 11:54:39 -0400 Subject: [PATCH 66/96] remove new presets unrelated to node from other PR --- CMakePresets.json | 55 +++++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 38 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index d9fe2ccccf4b..9781b8213b71 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -144,6 +144,22 @@ "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, + { + "name": "windows-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_OPENGL": "OFF", + "MLN_WITH_EGL": "OFF", + "MLN_WITH_VULKAN": "OFF", + "MLN_WITH_GLFW": "OFF" + } + }, { "name": "windows-opengl", "binaryDir": "${sourceDir}/build-windows-opengl", @@ -197,44 +213,7 @@ "MLN_USE_BUILTIN_ICU": "ON" } }, - { - "name": "windows-arm64", - "hidden": true, - "generator": "Visual Studio 17 2022", - "architecture": { - "value": "ARM64", - "strategy": "set" - }, - "cacheVariables": { - "CMAKE_SYSTEM_NAME": "Windows", - "MLN_WITH_OPENGL": "OFF", - "MLN_WITH_EGL": "OFF", - "MLN_WITH_VULKAN": "OFF", - "MLN_WITH_GLFW": "OFF" - } - }, - { - "name": "windows-arm64-opengl", - "hidden": false, - "inherits": "windows-arm64", - "displayName": "Windows ARM64 OpenGL", - "description": "Windows ARM64 build (OpenGL renderer)", - "cacheVariables": { - "MLN_WITH_OPENGL": "ON", - "MLN_WITH_GLFW": "ON" - } - }, - { - "name": "windows-arm64-vulkan", - "hidden": false, - "inherits": "windows-arm64", - "displayName": "Windows ARM64 Vulkan", - "description": "Windows ARM64 build (Vulkan renderer)", - "cacheVariables": { - "MLN_WITH_VULKAN": "ON", - "MLN_WITH_GLFW": "ON" - } - }, + { "name": "windows-opengl-node", "inherits": "windows", From 432d89223d0fec9c032fbaf9d48ca2009590a2d2 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 12:05:31 -0400 Subject: [PATCH 67/96] fix preset name --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 71d6e5537415..75972fe46c53 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -234,7 +234,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-opengl-arm64-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' From 04bd413afab4f6a2fe689ec1403a87658555ca8e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 12:05:38 -0400 Subject: [PATCH 68/96] Update node-release.yml --- .github/workflows/node-release.yml | 94 +++++++++++++++--------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 350fe4fb82d6..8a3dedde4027 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -116,17 +116,21 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows) - if: runner.os == 'Windows' + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' uses: ilammy/msvc-dev-cmd@v1 - # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - - name: Remove Strawberry Perl from PATH (Windows) + - name: Set up msvc dev cmd (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_arm64 + + - name: Test VSCMD_ARG_TGT_ARCH Environment if: runner.os == 'Windows' - shell: pwsh run: | - $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" - "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd - name: cmake version run: | @@ -136,22 +140,22 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@v1 with: - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@v1 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} - name: Cache cmake-node-module deps uses: actions/cache@v4 @@ -163,47 +167,44 @@ jobs: - name: Configure maplibre-native (MacOS) if: runner.os == 'MacOS' run: | - cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' run: | - cmake . -B build \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DMLN_WITH_NODE=ON \ - -DMLN_WITH_OPENGL=ON - - - name: "Create directory '${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache' (Windows)" + cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + + - name: Get vcpkg commit id if: runner.os == 'Windows' - run: mkdir -p ${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache - shell: bash + shell: pwsh + run: | + $vcpkg_commit_id = ($(git submodule status .\platform\windows\vendor\vcpkg).Trim() -split ' ')[0] + Add-Content -Path $env:GITHUB_ENV -Value "VCPKG_COMMIT_ID=${vcpkg_commit_id}" - - name: Restore vcpkg cache (Windows) + - name: Restore vcpkg binary cache if: runner.os == 'Windows' - uses: actions/cache@v4 + uses: actions/cache/restore@v4 with: - path: | - ${{ github.workspace }}/platform/windows/vendor/vcpkg - !${{ github.workspace }}/platform/windows/vendor/vcpkg/buildtrees - !${{ github.workspace }}/platform/windows/vendor/vcpkg/packages - !${{ github.workspace }}/platform/windows/vendor/vcpkg/downloads - !${{ github.workspace }}/platform/windows/vendor/vcpkg/installed - key: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ hashFiles( '.git/modules/platform/windows/vendor/vcpkg/HEAD' ) }}-${{ hashFiles( 'platform/windows/Get-VendorPackages.ps1' ) }} - - - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' + path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives + key: vcpkg-${{ env.VCPKG_COMMIT_ID }} + + - name: Configure maplibre-native (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + + - name: Configure maplibre-native (Windows arm64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON \ - -DMLN_WITH_OPENGL=ON + cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' @@ -311,3 +312,4 @@ jobs: npm publish --tag next --access public env: NPM_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} + \ No newline at end of file From 4c579bd06ee9a3ad42c3216a6053ee6b7134aea1 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 12:07:13 -0400 Subject: [PATCH 69/96] fix whitespace --- .github/workflows/node-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 8a3dedde4027..a2a80a9fde85 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -312,4 +312,3 @@ jobs: npm publish --tag next --access public env: NPM_TOKEN: ${{ secrets.NPM_ORG_TOKEN }} - \ No newline at end of file From b82b8c0ae6697768ad9e8dc9c0409d3fb09c741e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 14:19:19 -0400 Subject: [PATCH 70/96] Update .nvmrc --- platform/node/.nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/.nvmrc b/platform/node/.nvmrc index 409940768f2a..a45fd52cc589 100644 --- a/platform/node/.nvmrc +++ b/platform/node/.nvmrc @@ -1 +1 @@ -23 +24 From 3a83f6e713e54597c28f17c51270b239153a09ca Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 14:44:56 -0400 Subject: [PATCH 71/96] re-org presets --- CMakePresets.json | 49 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 9781b8213b71..e246aaa984f2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -144,22 +144,6 @@ "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, - { - "name": "windows-arm64", - "hidden": true, - "generator": "Visual Studio 17 2022", - "architecture": { - "value": "ARM64", - "strategy": "set" - }, - "cacheVariables": { - "CMAKE_SYSTEM_NAME": "Windows", - "MLN_WITH_OPENGL": "OFF", - "MLN_WITH_EGL": "OFF", - "MLN_WITH_VULKAN": "OFF", - "MLN_WITH_GLFW": "OFF" - } - }, { "name": "windows-opengl", "binaryDir": "${sourceDir}/build-windows-opengl", @@ -177,6 +161,18 @@ "MLN_USE_BUILTIN_ICU": "ON" } }, + { + "name": "windows-opengl-node", + "inherits": "windows", + "binaryDir": "${sourceDir}/build", + "displayName": "Windows Node", + "description": "Windows Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" + } + }, { "name": "windows-egl", "binaryDir": "${sourceDir}/build-windows-egl", @@ -213,17 +209,20 @@ "MLN_USE_BUILTIN_ICU": "ON" } }, - { - "name": "windows-opengl-node", - "inherits": "windows", - "binaryDir": "${sourceDir}/build", - "displayName": "Windows Node", - "description": "Windows Node build (OpenGL renderer)", + "name": "windows-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, "cacheVariables": { - "MLN_WITH_NODE": "ON", - "MLN_WITH_OPENGL": "ON", - "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_OPENGL": "OFF", + "MLN_WITH_EGL": "OFF", + "MLN_WITH_VULKAN": "OFF", + "MLN_WITH_GLFW": "OFF" } }, { From 19a9745ea57c6417b611e1ddf2a0d3cf6bba4f16 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 14:45:09 -0400 Subject: [PATCH 72/96] update test abi version --- .github/workflows/node-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 75972fe46c53..499f963905d7 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -279,7 +279,7 @@ jobs: GALLIUM_DRIVER: llvmpipe run: | (Invoke-WebRequest https://api.github.com/repos/pal1000/mesa-dist-win/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa3d-.+-release-msvc\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z } - & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll + & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll npm test - name: Test (Windows ARM64) @@ -291,7 +291,7 @@ jobs: GALLIUM_DRIVER: llvmpipe run: | (Invoke-WebRequest https://api.github.com/repos/mmozeiko/build-mesa/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa-llvmpipe-arm64-.+\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z } - & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z opengl32.dll libGLESv2.dll + & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z opengl32.dll libGLESv2.dll npm test # On PRs make sure that the npm package can be packaged. - name: Pack From 6ded9f3387ec64df5448fa7d2bacf7a459582c7f Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 16:08:03 -0400 Subject: [PATCH 73/96] test if other compiler is actually needed --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 499f963905d7..362b06562d6d 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -234,7 +234,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' From 797c3f9edf2b81e4439d7de38aa2c4be2c16d6a6 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 16:23:34 -0400 Subject: [PATCH 74/96] update min node version --- platform/node/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/package.json b/platform/node/package.json index 1f4afac2452d..87abb242a249 100644 --- a/platform/node/package.json +++ b/platform/node/package.json @@ -55,7 +55,7 @@ "xcode": "^3.0.1" }, "engines": { - "node": ">=18" + "node": ">=20" }, "scripts": { "install": "node-pre-gyp install --fallback-to-build=false", From b5f147e19dd43bf0811158776cd89ef78193267a Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 18:55:33 -0400 Subject: [PATCH 75/96] Revert "test if other compiler is actually needed" This reverts commit 6ded9f3387ec64df5448fa7d2bacf7a459582c7f. --- .github/workflows/node-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 362b06562d6d..499f963905d7 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -234,7 +234,7 @@ jobs: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' From 843eaa04f80ab3a7c9c9e51a0f21e59dbddf566a Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 19:41:37 -0400 Subject: [PATCH 76/96] fix: The contents of are available only with C++23 or later. based on info in https://github.com/lballabio/QuantLib/issues/1827 --- vendor/boost | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/boost b/vendor/boost index 805bc2ee74cc..cd47f999e365 160000 --- a/vendor/boost +++ b/vendor/boost @@ -1 +1 @@ -Subproject commit 805bc2ee74cc06d7159ec9ac9bf56072c16a2389 +Subproject commit cd47f999e365875e7b4eeeb8f85667d7be57a446 From 5b7621653cfc4a53748fd522b58cdac4efa70919 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 20:18:29 -0400 Subject: [PATCH 77/96] Update CMakePresets.json --- CMakePresets.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index e246aaa984f2..e5face8df126 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -225,6 +225,28 @@ "MLN_WITH_GLFW": "OFF" } }, + { + "name": "windows-arm64-opengl", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 OpenGL", + "description": "Windows ARM64 build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_OPENGL": "ON", + "MLN_WITH_GLFW": "ON" + } + }, + { + "name": "windows-arm64-vulkan", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Vulkan", + "description": "Windows ARM64 build (Vulkan renderer)", + "cacheVariables": { + "MLN_WITH_VULKAN": "ON", + "MLN_WITH_GLFW": "ON" + } + }, { "name": "windows-arm64-opengl-node", "binaryDir": "${sourceDir}/build", From 2139247d4778799dc2245a05867bf060705088ef Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 21:04:22 -0400 Subject: [PATCH 78/96] Update CMakePresets.json --- CMakePresets.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index e5face8df126..f64a8d8e1438 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -236,17 +236,6 @@ "MLN_WITH_GLFW": "ON" } }, - { - "name": "windows-arm64-vulkan", - "hidden": false, - "inherits": "windows-arm64", - "displayName": "Windows ARM64 Vulkan", - "description": "Windows ARM64 build (Vulkan renderer)", - "cacheVariables": { - "MLN_WITH_VULKAN": "ON", - "MLN_WITH_GLFW": "ON" - } - }, { "name": "windows-arm64-opengl-node", "binaryDir": "${sourceDir}/build", @@ -258,6 +247,17 @@ "MLN_WITH_OPENGL": "ON", "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" } + }, + { + "name": "windows-arm64-vulkan", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Vulkan", + "description": "Windows ARM64 build (Vulkan renderer)", + "cacheVariables": { + "MLN_WITH_VULKAN": "ON", + "MLN_WITH_GLFW": "ON" + } } ], "buildPresets": [ From fe71b77c32865a33496fe06d62a456a3a4500dfc Mon Sep 17 00:00:00 2001 From: acalcutt Date: Sun, 31 Aug 2025 23:18:36 -0400 Subject: [PATCH 79/96] test setting VSCMD_ARG_TGT_ARCH enc in presets --- .github/workflows/node-ci.yml | 8 +------- CMakePresets.json | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 499f963905d7..d2544754db4f 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -147,14 +147,8 @@ jobs: run: npm ci --ignore-scripts - name: Set up msvc dev cmd (Windows x64) - if: runner.os == 'Windows' && matrix.arch == 'x86_64' - uses: ilammy/msvc-dev-cmd@v1 - - - name: Set up msvc dev cmd (Windows ARM64) - if: runner.os == 'Windows' && matrix.arch == 'arm64' + if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 - with: - arch: amd64_arm64 - name: Test VSCMD_ARG_TGT_ARCH Environment if: runner.os == 'Windows' diff --git a/CMakePresets.json b/CMakePresets.json index f64a8d8e1438..bd44d793a43a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -217,6 +217,9 @@ "value": "ARM64", "strategy": "set" }, + "environment": { + "VSCMD_ARG_TGT_ARCH": "arm64" + }, "cacheVariables": { "CMAKE_SYSTEM_NAME": "Windows", "MLN_WITH_OPENGL": "OFF", From 3e6988d6ef17e120c131e8ab35b96c109c6ee02b Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 00:19:10 -0400 Subject: [PATCH 80/96] bring node-ci changes to node-release, get rid of VSCMD_ARG_TGT_ARCH test --- .github/workflows/node-ci.yml | 8 +------- .github/workflows/node-release.yml | 16 ++-------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index d2544754db4f..6e51dabb0e0e 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -146,16 +146,10 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows x64) + - name: Set up msvc dev cmd (Windows) if: runner.os == 'Windows' uses: ilammy/msvc-dev-cmd@v1 - - name: Test VSCMD_ARG_TGT_ARCH Environment - if: runner.os == 'Windows' - run: | - echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" - shell: cmd - - name: cmake version run: | cmake --version diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index a2a80a9fde85..47f2af939798 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -116,21 +116,9 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows x64) - if: runner.os == 'Windows' && matrix.arch == 'x86_64' - uses: ilammy/msvc-dev-cmd@v1 - - - name: Set up msvc dev cmd (Windows ARM64) - if: runner.os == 'Windows' && matrix.arch == 'arm64' - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: amd64_arm64 - - - name: Test VSCMD_ARG_TGT_ARCH Environment + - name: Set up msvc dev cmd (Windows) if: runner.os == 'Windows' - run: | - echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" - shell: cmd + uses: ilammy/msvc-dev-cmd@v1 - name: cmake version run: | From 2e0711bb09dc299ecedddaf9944c8e05375d854d Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 09:14:28 -0400 Subject: [PATCH 81/96] revert test setting VSCMD_ARG_TGT_ARCH enc in presets --- .github/workflows/node-ci.yml | 16 ++++++++++++++-- CMakePresets.json | 3 --- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 6e51dabb0e0e..499f963905d7 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -146,9 +146,21 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows) - if: runner.os == 'Windows' + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Set up msvc dev cmd (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_arm64 + + - name: Test VSCMD_ARG_TGT_ARCH Environment + if: runner.os == 'Windows' + run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd - name: cmake version run: | diff --git a/CMakePresets.json b/CMakePresets.json index bd44d793a43a..f64a8d8e1438 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -217,9 +217,6 @@ "value": "ARM64", "strategy": "set" }, - "environment": { - "VSCMD_ARG_TGT_ARCH": "arm64" - }, "cacheVariables": { "CMAKE_SYSTEM_NAME": "Windows", "MLN_WITH_OPENGL": "OFF", From 3a90be6262402f0cf2cd79841dad5849271fb97a Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 20:38:30 -0400 Subject: [PATCH 82/96] put VSCMD_ARG_TGT_ARCH back into CMakePresets.json --- CMakePresets.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index f64a8d8e1438..bd44d793a43a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -217,6 +217,9 @@ "value": "ARM64", "strategy": "set" }, + "environment": { + "VSCMD_ARG_TGT_ARCH": "arm64" + }, "cacheVariables": { "CMAKE_SYSTEM_NAME": "Windows", "MLN_WITH_OPENGL": "OFF", From ef2fe631e0ca219008266246ff834dd4437c117d Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 20:56:05 -0400 Subject: [PATCH 83/96] Bump version and add changelog --- platform/node/CHANGELOG.md | 7 +++++++ platform/node/package-lock.json | 4 ++-- platform/node/package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/platform/node/CHANGELOG.md b/platform/node/CHANGELOG.md index f5d64c4716fb..2afdf076d6c8 100644 --- a/platform/node/CHANGELOG.md +++ b/platform/node/CHANGELOG.md @@ -1,5 +1,12 @@ ## main +## 6.3.0-pre.0 +* Updated supported node versions to v20, v22, and v24 +* Updated the linux binary to be built on Ubuntu 24.04 +* Updated NAN to v2.23.0 to support node v24 +* Moved node-pre-gyp back to @acalcutt/node-pre-gyp to support node v24. There is currently an issue with releases of @mapbox/node-pre-gyp which is preventing using it. +* Add Windows arm64 binary to workflow. + ## 6.2.0 * Fix freezing in macos/metal after ~32 renders ([Issue](https://github.com/maplibre/maplibre-native/issues/2928), [PR](https://github.com/maplibre/maplibre-native/pull/3673)). * Add HarfBuzz Text Shaping and Font Fallback Support ([#3611](https://github.com/maplibre/maplibre-native/pull/3611)). diff --git a/platform/node/package-lock.json b/platform/node/package-lock.json index e9df42981a14..d5a7a645f0f7 100644 --- a/platform/node/package-lock.json +++ b/platform/node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "hasInstallScript": true, "license": "BSD-2-Clause", "dependencies": { diff --git a/platform/node/package.json b/platform/node/package.json index 87abb242a249..f73aa5b00dff 100644 --- a/platform/node/package.json +++ b/platform/node/package.json @@ -1,6 +1,6 @@ { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "description": "Renders map tiles with MapLibre Native", "keywords": [ "maplibre", From 8c2e0313d9be98fb5e2c7b67beabad6020f42ac2 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 20:59:38 -0400 Subject: [PATCH 84/96] Update CHANGELOG.md --- platform/node/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/node/CHANGELOG.md b/platform/node/CHANGELOG.md index 2afdf076d6c8..3739a4a9fdb4 100644 --- a/platform/node/CHANGELOG.md +++ b/platform/node/CHANGELOG.md @@ -1,11 +1,11 @@ ## main ## 6.3.0-pre.0 -* Updated supported node versions to v20, v22, and v24 +* Updated supported node versions to v20, v22, and v24. Support for node v18 has been removed. * Updated the linux binary to be built on Ubuntu 24.04 * Updated NAN to v2.23.0 to support node v24 * Moved node-pre-gyp back to @acalcutt/node-pre-gyp to support node v24. There is currently an issue with releases of @mapbox/node-pre-gyp which is preventing using it. -* Add Windows arm64 binary to workflow. +* Add Windows arm64 binary build to ci and release workflows. ## 6.2.0 * Fix freezing in macos/metal after ~32 renders ([Issue](https://github.com/maplibre/maplibre-native/issues/2928), [PR](https://github.com/maplibre/maplibre-native/pull/3673)). From e8d8244af36f086f6c1847c2e5911e6ffb617827 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 21:12:14 -0400 Subject: [PATCH 85/96] adjust ccache keys --- .github/workflows/node-ci.yml | 6 ++++-- .github/workflows/node-release.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index af3d6fef5c50..fb9925027050 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -171,22 +171,24 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1 with: - key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Cache cmake-node-module deps uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 8c0b9255d212..2650542bb31c 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -141,22 +141,24 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1 with: - key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@63069e3931dedbf3b63792097479563182fe70d1 # v1 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Cache cmake-node-module deps uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 From ef109251da58a37cd5a90a47675c1dbe3f749e4c Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 21:35:23 -0400 Subject: [PATCH 86/96] turn off fail-fast in windows ci --- .github/workflows/windows-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ea0e514362e8..81039714e96e 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -107,6 +107,7 @@ jobs: windows-build-and-test-msvc: needs: windows-get-or-build-dependencies + fail-fast: false strategy: matrix: renderer: [opengl, egl, vulkan] @@ -242,6 +243,7 @@ jobs: if: needs.pre-job.outputs.should_skip != 'true' needs: pre-job strategy: + fail-fast: false matrix: msystem: [clang64, mingw64, ucrt64] renderer: [opengl, egl, vulkan] From 683f5b722785be09b212db421f778880fae9a18e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 21:43:36 -0400 Subject: [PATCH 87/96] fix fail-fast syntax --- .github/workflows/windows-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 81039714e96e..3bbdf4511c44 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -107,8 +107,8 @@ jobs: windows-build-and-test-msvc: needs: windows-get-or-build-dependencies - fail-fast: false strategy: + fail-fast: false matrix: renderer: [opengl, egl, vulkan] runs-on: windows-2022 @@ -243,7 +243,7 @@ jobs: if: needs.pre-job.outputs.should_skip != 'true' needs: pre-job strategy: - fail-fast: false + fail-fast: false matrix: msystem: [clang64, mingw64, ucrt64] renderer: [opengl, egl, vulkan] From 90ee6e148448e78988409ff4fb1c5cc40d1a68ac Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 22:18:18 -0400 Subject: [PATCH 88/96] Update windows.cmake --- platform/windows/windows.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index b4a3aba62863..7de9eea7a1fc 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -41,7 +41,18 @@ elseif(DEFINED ENV{MSYSTEM}) find_package(ICU OPTIONAL_COMPONENTS i18n uc data) find_package(JPEG REQUIRED) + + # Find ZLIB first to control linking order + find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) + + # For MSYS2, ensure PNG uses static zlib only + if(TARGET PNG::PNG AND TARGET ZLIB::ZLIB) + set_target_properties(PNG::PNG PROPERTIES + INTERFACE_LINK_LIBRARIES "ZLIB::ZLIB" + ) + endif() + find_package(PkgConfig REQUIRED) pkg_search_module(WEBP libwebp REQUIRED) From 94518e4ae2f059845d7e47a9236396bfe1c92d7e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 22:20:38 -0400 Subject: [PATCH 89/96] Update windows.cmake --- platform/windows/windows.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 7de9eea7a1fc..efc1a608c4b0 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -41,11 +41,11 @@ elseif(DEFINED ENV{MSYSTEM}) find_package(ICU OPTIONAL_COMPONENTS i18n uc data) find_package(JPEG REQUIRED) - + # Find ZLIB first to control linking order find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) - + # For MSYS2, ensure PNG uses static zlib only if(TARGET PNG::PNG AND TARGET ZLIB::ZLIB) set_target_properties(PNG::PNG PROPERTIES From d97b2963470e7e822b9d9331a72c5c9e03c19cb1 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 22:22:31 -0400 Subject: [PATCH 90/96] Update windows.cmake --- platform/windows/windows.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index efc1a608c4b0..2abef4fe7f2e 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -52,7 +52,7 @@ elseif(DEFINED ENV{MSYSTEM}) INTERFACE_LINK_LIBRARIES "ZLIB::ZLIB" ) endif() - + find_package(PkgConfig REQUIRED) pkg_search_module(WEBP libwebp REQUIRED) From c3bbb2f9e150ae9abd112d7230d83687538315ee Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 22:37:41 -0400 Subject: [PATCH 91/96] Update windows.cmake --- platform/windows/windows.cmake | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 2abef4fe7f2e..41db414714c4 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -41,20 +41,19 @@ elseif(DEFINED ENV{MSYSTEM}) find_package(ICU OPTIONAL_COMPONENTS i18n uc data) find_package(JPEG REQUIRED) - - # Find ZLIB first to control linking order - find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) + find_package(PkgConfig REQUIRED) - # For MSYS2, ensure PNG uses static zlib only - if(TARGET PNG::PNG AND TARGET ZLIB::ZLIB) + # Fix zlib conflicts in MSYS2 builds + if(TARGET PNG::PNG) + # Get the actual PNG libraries from pkg-config to avoid zlib conflicts + pkg_check_modules(PNG_PC libpng REQUIRED) set_target_properties(PNG::PNG PROPERTIES - INTERFACE_LINK_LIBRARIES "ZLIB::ZLIB" + INTERFACE_LINK_LIBRARIES "${PNG_PC_LINK_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${PNG_PC_INCLUDE_DIRS}" ) endif() - find_package(PkgConfig REQUIRED) - pkg_search_module(WEBP libwebp REQUIRED) pkg_search_module(LIBUV libuv REQUIRED) pkg_search_module(CURL libcurl REQUIRED) From 986d7147bd237b2ae3cce6762a9c726ddab47a22 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 23:16:20 -0400 Subject: [PATCH 92/96] Revert windows-ci.yml --- .github/workflows/windows-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 3bbdf4511c44..ea0e514362e8 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -108,7 +108,6 @@ jobs: windows-build-and-test-msvc: needs: windows-get-or-build-dependencies strategy: - fail-fast: false matrix: renderer: [opengl, egl, vulkan] runs-on: windows-2022 @@ -243,7 +242,6 @@ jobs: if: needs.pre-job.outputs.should_skip != 'true' needs: pre-job strategy: - fail-fast: false matrix: msystem: [clang64, mingw64, ucrt64] renderer: [opengl, egl, vulkan] From 32956a034c961a1a41518e5b94bd00d4d7c29bce Mon Sep 17 00:00:00 2001 From: acalcutt Date: Mon, 1 Sep 2025 23:17:28 -0400 Subject: [PATCH 93/96] Revert windows.cmake --- platform/windows/windows.cmake | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 41db414714c4..b4a3aba62863 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -44,16 +44,6 @@ elseif(DEFINED ENV{MSYSTEM}) find_package(PNG REQUIRED) find_package(PkgConfig REQUIRED) - # Fix zlib conflicts in MSYS2 builds - if(TARGET PNG::PNG) - # Get the actual PNG libraries from pkg-config to avoid zlib conflicts - pkg_check_modules(PNG_PC libpng REQUIRED) - set_target_properties(PNG::PNG PROPERTIES - INTERFACE_LINK_LIBRARIES "${PNG_PC_LINK_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${PNG_PC_INCLUDE_DIRS}" - ) - endif() - pkg_search_module(WEBP libwebp REQUIRED) pkg_search_module(LIBUV libuv REQUIRED) pkg_search_module(CURL libcurl REQUIRED) From 265e9f7ceeb8ee572204b4748d084586cfbf35eb Mon Sep 17 00:00:00 2001 From: Andrew Calcutt Date: Fri, 19 Sep 2025 20:10:41 -0400 Subject: [PATCH 94/96] Update platform/node/cmake/module.cmake Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- platform/node/cmake/module.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/node/cmake/module.cmake b/platform/node/cmake/module.cmake index 61f558d44881..36450cc4a65d 100644 --- a/platform/node/cmake/module.cmake +++ b/platform/node/cmake/module.cmake @@ -1,4 +1,4 @@ -# We need CMake 3.9 because the Xcode generator doesn't know about systems include paths before 3.9. +# We need CMake 3.10 because the Xcode generator doesn't know about systems include paths before 3.9, and the minimum required version has been increased to 3.10. # See https://gitlab.kitware.com/cmake/cmake/issues/16795 cmake_minimum_required(VERSION 3.10) From 73c545d1d2e66476669a4c4617701b13f8e7599e Mon Sep 17 00:00:00 2001 From: acalcutt Date: Fri, 19 Sep 2025 20:35:07 -0400 Subject: [PATCH 95/96] publish binaries as draft --- platform/node/scripts/publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/node/scripts/publish.sh b/platform/node/scripts/publish.sh index 1a7cbf2e0a3d..6a032716edd4 100755 --- a/platform/node/scripts/publish.sh +++ b/platform/node/scripts/publish.sh @@ -14,10 +14,10 @@ if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then ./node_modules/.bin/node-pre-gyp package --target="${TARGET}" $@ - ./node_modules/.bin/node-pre-gyp-github publish --release + ./node_modules/.bin/node-pre-gyp-github publish elif [[ "${BUILDTYPE}" == "Debug" ]]; then ./node_modules/.bin/node-pre-gyp package --target="${TARGET}" --debug $@ - ./node_modules/.bin/node-pre-gyp-github publish --release + ./node_modules/.bin/node-pre-gyp-github publish else echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE" exit 1 From 7fc828a3db4a58ce0cbe8e61af21b26427337262 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Fri, 19 Sep 2025 20:45:18 -0400 Subject: [PATCH 96/96] Update node-release.yml --- .github/workflows/node-release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index 01d5d4a23b69..0f5a4087e06d 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -66,10 +66,13 @@ jobs: shell: bash steps: + - if: runner.os == 'Windows' + run: git config --global core.longpaths true + - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: - submodules: true + submodules: recursive persist-credentials: false - name: Get OS Architecture @@ -123,7 +126,6 @@ jobs: - name: Set up msvc dev cmd (Windows ARM64) if: runner.os == 'Windows' && matrix.arch == 'arm64' uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 - with: arch: amd64_arm64 @@ -186,7 +188,7 @@ jobs: - name: Restore vcpkg binary cache if: runner.os == 'Windows' - uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 + uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 with: path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives key: vcpkg-${{ env.VCPKG_COMMIT_ID }}