From: Uwe Hermann Date: Sun, 25 Mar 2018 21:15:25 +0000 (+0200) Subject: CMakeLists.txt: Fix a build issue on MSYS2. X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=929b9b19c6a4ca673696c7cabca823acf542d182 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. --- 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)