From 929b9b19c6a4ca673696c7cabca823acf542d182 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 25 Mar 2018 23:15:25 +0200 Subject: [PATCH] CMakeLists.txt: Fix a build issue on MSYS2. Only apply an MXE-specific workaround on MXE (but not when building natively using MSYS2), otherwise there are issues on MSYS2. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2f12102..09f28a19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,10 @@ find_package(Qt5 COMPONENTS Core Gui Widgets Svg REQUIRED) if(WIN32) # MXE workaround: Use pkg-config to find Qt5 libs. # https://github.com/mxe/mxe/issues/1642 - pkg_check_modules(QT5ALL REQUIRED Qt5Widgets Qt5Gui Qt5Svg) + # Not required (and doesn't work) on MSYS2. + if(NOT DEFINED ENV{MSYSTEM}) + pkg_check_modules(QT5ALL REQUIRED Qt5Widgets Qt5Gui Qt5Svg) + endif() endif() set(QT_LIBRARIES Qt5::Gui Qt5::Widgets Qt5::Svg) -- 2.30.2