mirror of
https://github.com/curl/curl.git
synced 2026-07-25 13:47:23 +03:00
cmake: move mingw UWP workaround from GHA to CMakeLists.txt
CMake (as of 3.31.2) doesn't fully recognize mingw-w64 with `CMAKE_SYSTEM_NAME=WindowsStore`. The manual logic works around it. Also move existing DJGPP workaround to the same block. Closes #16019
This commit is contained in:
parent
f07612cd9a
commit
5902e18844
2 changed files with 12 additions and 12 deletions
6
.github/workflows/windows.yml
vendored
6
.github/workflows/windows.yml
vendored
|
|
@ -242,17 +242,11 @@ jobs:
|
|||
gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}"
|
||||
cflags+=" -specs=$(cygpath -w "${specs}")"
|
||||
fi
|
||||
# CMake (as of v3.31.0) gets confused and applies the MSVC rc.exe command-line
|
||||
# template to windres. Reset it to the windres template manually:
|
||||
rcopts='<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>'
|
||||
else
|
||||
rcopts=''
|
||||
fi
|
||||
[ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
||||
[ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
||||
cmake -B bld -G Ninja ${options} \
|
||||
"-DCMAKE_C_FLAGS=${{ matrix.cflags }} ${cflags}" \
|
||||
"-DCMAKE_RC_COMPILE_OBJECT=${rcopts}" \
|
||||
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue