Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: move mingw UWP workaround from GHA to CMakeLists.txt #16019

Closed
wants to merge 8 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jan 16, 2025

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.


Failure example without the workaround:

[2/16] Building RC object lib/CMakeFiles/libcurl_shared.dir/libcurl.rc.obj
FAILED: lib/CMakeFiles/libcurl_shared.dir/libcurl.rc.obj 
D:\a\_temp\msys64\ucrt64\bin\windres.exe -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -DUNICODE -D_UNICODE -Dlibcurl_shared_EXPORTS -I D:/a/curl/curl/include -I D:/a/curl/curl/bld/lib -I D:/a/curl/curl/lib -I D:/a/_temp/msys64/ucrt64/include -DCURL_EMBED_MANIFEST /fo lib/CMakeFiles/libcurl_shared.dir/libcurl.rc.obj D:/a/curl/curl/lib/libcurl.rc
Usage: D:\a\_temp\msys64\ucrt64\bin\windres.exe [option(s)] [input-file] [output-file]
 The options are:
  -i --input=<file>            Name input file
  -o --output=<file>           Name output file
  -J --input-format=<format>   Specify input format
  -O --output-format=<format>  Specify output format
  -F --target=<target>         Specify COFF target
     --preprocessor=<program>  Program to use to preprocess rc file
     --preprocessor-arg=<arg>  Additional preprocessor argument
  -I --include-dir=<dir>       Include directory when preprocessing rc file
  -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
  -U --undefine <sym>          Undefine SYM when preprocessing rc file
  -v --verbose                 Verbose - tells you what it's doing
  -c --codepage=<codepage>     Specify default codepage
  -l --language=<val>          Set language when reading rc file
     --use-temp-file           Use a temporary file instead of popen to read
                               the preprocessor output
     --no-use-temp-file        Use popen (default)
  -r                           Ignored for compatibility with rc
  @<file>                      Read options from <file>
  -h --help                    Print this help message
  -V --version                 Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified.  A single file name is an input file.
No input-file is stdin, default rc.  No output-file is stdout, default rc.
D:\a\_temp\msys64\ucrt64\bin\windres.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 pe-i386 pei-i386 elf32-i386 elf32-iamcu pdb elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin

https://github.com/curl/curl/actions/runs/12808644523/job/35711843082?pr=16019#step:10:13

@vszakats vszakats added build cmake Windows Windows-specific CI Continuous Integration labels Jan 16, 2025
@vszakats vszakats marked this pull request as draft January 16, 2025 12:15
@vszakats vszakats marked this pull request as ready for review January 16, 2025 12:19
@vszakats vszakats changed the title cmake: improve built-in support for mingw UWP builds cmake: move mingw UWP workaround from GHA to CMakeLists.txt. Jan 16, 2025
@vszakats vszakats changed the title cmake: move mingw UWP workaround from GHA to CMakeLists.txt. cmake: move mingw UWP workaround from GHA to CMakeLists.txt Jan 16, 2025
@vszakats vszakats closed this in 5902e18 Jan 16, 2025
@vszakats vszakats deleted the uwp branch January 16, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build CI Continuous Integration cmake Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

1 participant