From 6cd04bc7e5316dc831cdf97e372a266f0dbf5eb0 Mon Sep 17 00:00:00 2001 From: Aleksey Dobrunov Date: Thu, 8 Aug 2024 22:02:20 +0500 Subject: [PATCH] fix build on arm platform --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f965f1..13c16f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,6 +50,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(CMAKE_RC_FLAGS -D_WIN64) endif() + if("${COLORER_BUILD_ARCH}" STREQUAL "ARM64") + # Fix build on GitHub agent (VSCMD_VER: 17.10.5 , VCToolsVersion: 14.40.33807) + set(LINK_FLAGS "${LINK_FLAGS} /ALTERNATENAME:__imp___std_init_once_begin_initialize=__imp_InitOnceBeginInitialize") + set(LINK_FLAGS "${LINK_FLAGS} /ALTERNATENAME:__imp___std_init_once_complete=__imp_InitOnceComplete") + endif() + # xerces-c vs msxml add_definitions(-DNOGDI) # old functions