From c520faed6d0e5e9472622f848ad8512b6c71c8e0 Mon Sep 17 00:00:00 2001 From: flow Date: Thu, 13 Oct 2022 18:37:44 -0300 Subject: [PATCH] feat: add gulrak/filesystem submodule ... for old macs that don't have std::filesystem in their stdlib. Signed-off-by: flow --- .gitmodules | 3 +++ CMakeLists.txt | 1 + launcher/CMakeLists.txt | 1 + libraries/README.md | 8 ++++++++ libraries/filesystem | 1 + 5 files changed, 14 insertions(+) create mode 160000 libraries/filesystem diff --git a/.gitmodules b/.gitmodules index 534ffd37..efd5de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "libraries/tomlplusplus"] path = libraries/tomlplusplus url = https://github.com/marzer/tomlplusplus.git +[submodule "libraries/filesystem"] + path = libraries/filesystem + url = https://github.com/gulrak/filesystem diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d1d3d87..05ea9f66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,6 +323,7 @@ endif() add_subdirectory(libraries/katabasis) # An OAuth2 library that tried to do too much add_subdirectory(libraries/gamemode) add_subdirectory(libraries/murmur2) # Hash for usage with the CurseForge API +add_subdirectory(libraries/filesystem) # Implementation of std::filesystem for old C++, for usage in old macOS ############################### Built Artifacts ############################### diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index c5894268..d04f3e4d 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -976,6 +976,7 @@ target_link_libraries(Launcher_logic BuildConfig Katabasis Qt${QT_VERSION_MAJOR}::Widgets + ghc_filesystem ) if (UNIX AND NOT CYGWIN AND NOT APPLE) diff --git a/libraries/README.md b/libraries/README.md index 6297cd9b..dfb57a65 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -10,6 +10,14 @@ This library has served as a base for some (much more full-featured and advanced Copyright belongs to Petr Mrázek, unless explicitly stated otherwise in the source files. Available under the Apache 2.0 license. +## filesystem + +Gulrak's implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD. + +See [github repo](https://github.com/gulrak/filesystem). + +MIT licensed. + ## gamemode A performance optimization daemon. diff --git a/libraries/filesystem b/libraries/filesystem new file mode 160000 index 00000000..cd6805e9 --- /dev/null +++ b/libraries/filesystem @@ -0,0 +1 @@ +Subproject commit cd6805e94dd5d6346be1b75a54cdc27787319dd2