From 845373e049ea513787721e8eadb3d98678e26ccb Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 6 Jul 2019 00:09:42 -0500 Subject: [PATCH] [ox/fs] Make macOS builds use Boost FileSystem --- deps/ox/src/ox/fs/CMakeLists.txt | 9 +++++++++ deps/ox/src/ox/fs/filesystem/passthroughfs.hpp | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/deps/ox/src/ox/fs/CMakeLists.txt b/deps/ox/src/ox/fs/CMakeLists.txt index 03da75de..9c608a45 100644 --- a/deps/ox/src/ox/fs/CMakeLists.txt +++ b/deps/ox/src/ox/fs/CMakeLists.txt @@ -10,10 +10,19 @@ add_library( ) if(NOT OX_BARE_METAL) + if(APPLE) + find_package(Boost COMPONENTS system filesystem REQUIRED) + set(BOOST_LIBS ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}) + target_compile_definitions( + OxFS PUBLIC + OX_USE_BOOSTFS + ) + endif() target_link_libraries( OxFS PUBLIC $<$:c++fs> $<$:stdc++fs> + ${BOOST_LIBS} ) set_property( TARGET diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp index 7925b7fd..2f046d5c 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp @@ -15,6 +15,10 @@ #include "filesystem.hpp" +#ifdef OX_USE_BOOSTFS +using std::filesystem = boost::filesystem; +#endif + namespace ox { /**