-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update MinGW CI to Ubuntu 20.04 #7259
Conversation
I'm seeing some CMake < 3.5 deprecation warnings, which make me unsure whether the MinGW image received the CMake update. I may need to push the new |
There's no SDL backend available because the SDL2 target for MinGW is a bit weird and breaks the find module. I was working on this too and have a fix; I'll put it here once I've cleaned it up a bit. |
This fixes SDL2: diff --git a/cmake/modules/FindSDL2.cmake b/cmake/modules/FindSDL2.cmake
index 3bad1002e..6e07f7aff 100644
--- a/cmake/modules/FindSDL2.cmake
+++ b/cmake/modules/FindSDL2.cmake
@@ -33,6 +33,18 @@
find_package(SDL2 CONFIG QUIET)
if(TARGET SDL2::SDL2)
+ # SDL2::SDL2 under MinGW is an interface target for reasons, so we can't get
+ # the library location from it. Print minimal information and return early.
+ get_target_property(sdl2_target_type SDL2::SDL2 TYPE)
+ if(sdl2_target_type STREQUAL "INTERFACE_LIBRARY")
+ unset(sdl2_target_type)
+ if(NOT SDL2_FIND_QUIETLY)
+ message(STATUS "Found SDL2 (found version \"${SDL2_VERSION}\")")
+ endif()
+ return()
+ endif()
+ unset(sdl2_target_type)
+
# Extract details for find_package_handle_standard_args
get_target_property(SDL2_LIBRARY SDL2::SDL2 LOCATION)
get_target_property(SDL2_INCLUDE_DIR SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) There's another issue in that no dependencies are bundled. This is because Once diff --git a/cmake/install/excludelist-win b/cmake/install/excludelist-win
index 17793a113..ac3c47901 100644
--- a/cmake/install/excludelist-win
+++ b/cmake/install/excludelist-win
@@ -3,17 +3,21 @@
ADVAPI32.dll
COMCTL32.dll
comdlg32.dll
+d3d11.dll
dwmapi.dll
+dxgi.dll
GDI32.dll
IMM32.dll
KERNEL32.dll
MPR.DLL
msvcrt.dll
+netapi32.dll
ole32.dll
OLEAUT32.dll
OPENGL32.DLL
SHELL32.dll
USER32.dll
+userenv.dll
UxTheme.dll
VERSION.dll
WINMM.DLL |
Would |
Unfortunately not - I also tried deducing it from the search paths we already pass for dependencies, but that breaks in a different way. The first thing we try to install is |
Can't we stash it with cmake_minimum_required(VERSION 2.6)
project(Tutorial)
set(MYVAR1 "foobar")
install(CODE "SET(MYVAR1 ${MYVAR1})")
set(MYVAR1 "barfoo")
install(CODE "MESSAGE(STATUS \${MYVAR1})") |
.. another possible option is to use a configured CMake input script, then source it back. This was my initial strategy for CPack but decided against it once I learned that values prefixed with |
Oh sorry I'm trying to create a workaround for a missing dependency. Well, it's a fun problem to solve :D. |
I can update the Linux image again to add the |
Quoting @messmerd /Discord 🗨️ :
Quoting @DomClark
I think it's the OS-one, not the mingw one @DomClark's referring to. https://packages.ubuntu.com/focal/binutils I could also try to leverage the mingw version through some hacks above, but I don't want to add undue complexity, so I'll await direction on that. |
The I like installing |
@DomClark what about https://github.com/LMMS/lmms/blob/master/cmake/modules/DefineInstallVar.cmake
|
That's equivalent to |
Thanks to @DomClark for the patch
This reverts commit 2e65453.
Update MinGW CI to Ubuntu 20.04 * Use ghcr.io/lmms/linux.mingw:20.04 * Fix deprecation in ClipView.cpp * Fix ccache and simplify git configuration * Apply patch by @DomClark for MinGW's SDL2 target * Update excludelist-win
This PR updates the MinGW CI builds to use Ubuntu 20.04 (focal) instead of Ubuntu 18.04 (bionic).
Changes made:
binutils
(see Dom's comment)Benefits:
Fixes #7256