Skip to content

Commit

Permalink
Fix Windows cross-compile issue after curl upgrade
Browse files Browse the repository at this point in the history
Without include directories in RCFLAGS, libcurl.rc couldn't find
its #include <winver.h>.
  • Loading branch information
SpaceManiac committed Jan 19, 2025
1 parent 377d35b commit 340e79c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/windows-cross/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set(CMAKE_C_COMPILER_TARGET i686-pc-windows-msvc)
set(CMAKE_CXX_COMPILER_TARGET ${CMAKE_C_COMPILER_TARGET})
set(CMAKE_C_FLAGS_INIT "-fms-compatibility /imsvc/xwin/crt/include /imsvc/xwin/sdk/include/ucrt /imsvc/xwin/sdk/include/um /imsvc/xwin/sdk/include/shared")
set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT})
set(CMAKE_RC_FLAGS_INIT ${CMAKE_C_FLAGS_INIT})
set(CMAKE_LINKER lld-link)
set(CMAKE_MT llvm-mt) # CMake can find rc=llvm-rc all by itself, but needs to be told mt=llvm-mt
set(CMAKE_EXE_LINKER_FLAGS_INIT "/LIBPATH:/xwin/crt/lib/x86 /LIBPATH:/xwin/sdk/lib/um/x86 /LIBPATH:/xwin/sdk/lib/ucrt/x86")
Expand Down

0 comments on commit 340e79c

Please sign in to comment.