diff --git a/src/ox/fs/CMakeLists.txt b/src/ox/fs/CMakeLists.txt index 03da75de4..9c608a45c 100644 --- a/src/ox/fs/CMakeLists.txt +++ b/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/src/ox/fs/filesystem/passthroughfs.hpp b/src/ox/fs/filesystem/passthroughfs.hpp index 7925b7fd1..2f046d5ce 100644 --- a/src/ox/fs/filesystem/passthroughfs.hpp +++ b/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 { /**