From 6e6c192eabaaf8dd7ccf935ea4a95f3681629b34 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Sun, 22 Dec 2019 16:41:23 +0100
Subject: [PATCH] Disable media_downloader example on old macOS

---
 examples/CMakeLists.txt | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 292c66869..6860fb41d 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -10,8 +10,13 @@ include_directories(../tests)
 add_executable(room_feed room_feed.cpp)
 target_link_libraries(room_feed MatrixClient::MatrixClient)
 
-add_executable(media_downloader media_downloader.cpp)
-target_link_libraries(media_downloader MatrixClient::MatrixClient)
+include(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX("filesystem" HAVE_STD_FILESYSTEM)
+
+if (HAVE_STD_FILESYSTEM)
+  add_executable(media_downloader media_downloader.cpp)
+  target_link_libraries(media_downloader MatrixClient::MatrixClient)
+endif()
 
 add_executable(simple_bot simple_bot.cpp)
 target_link_libraries(simple_bot MatrixClient::MatrixClient)
-- 
GitLab