diff --git a/CMakeLists.txt b/CMakeLists.txt index 28d8b1f20..368dcb44d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1341,12 +1341,17 @@ if(WIN32) list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_intel.c) list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_amd.c) - include(CheckIncludeFileCXX) - CHECK_INCLUDE_FILE_CXX("winrt/Windows.Foundation.h" HAVE_WINRT) - if(HAVE_WINRT) - message(STATUS "WinRT headers are available, media detection will be enabled") + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + message(STATUS "WinRT support is disabled due to known issues with g++") + set(HAVE_WINRT FALSE) else() - message(WARNING "WinRT headers are NOT available, media detection will be disabled") + include(CheckIncludeFileCXX) + CHECK_INCLUDE_FILE_CXX("winrt/Windows.Foundation.h" HAVE_WINRT) + if(HAVE_WINRT) + message(STATUS "WinRT headers are available, media detection will be enabled") + else() + message(WARNING "WinRT headers are NOT available, media detection will be disabled") + endif() endif() endif() include(CheckFunctionExists)