From 021627fff495da0ce0464bf359644880921cc07d Mon Sep 17 00:00:00 2001 From: Martin Shetty <1972005+martukas@users.noreply.github.com> Date: Wed, 13 Oct 2021 21:02:22 -0700 Subject: [PATCH] "std filsystem linking for older compilers; updates #255" --- source/cmd/CMakeLists.txt | 7 +++++++ source/gui/CMakeLists.txt | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/source/cmd/CMakeLists.txt b/source/cmd/CMakeLists.txt index 2f54b9bf..7da104f8 100644 --- a/source/cmd/CMakeLists.txt +++ b/source/cmd/CMakeLists.txt @@ -11,3 +11,10 @@ target_link_libraries( PRIVATE ${PROJECT_NAME}_producers PRIVATE ${PROJECT_NAME}_consumers ) + +# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary +target_link_libraries(${this_target} + $<$,$,9.0>>:stdc++fs>) +target_link_libraries(${this_target} + $<$,$,11.0>>:c++fs>) + diff --git a/source/gui/CMakeLists.txt b/source/gui/CMakeLists.txt index ec206414..03286086 100644 --- a/source/gui/CMakeLists.txt +++ b/source/gui/CMakeLists.txt @@ -65,3 +65,9 @@ target_link_libraries( Qt5::PrintSupport Qt5::Network ) + +# Link stdc++fs or c++experimental to get std::experimental::filesystem when necessary +target_link_libraries(${this_target} + $<$,$,9.0>>:stdc++fs>) +target_link_libraries(${this_target} + $<$,$,11.0>>:c++fs>)