[ox/fs] Make macOS builds use Boost FileSystem

This commit is contained in:
Gary Talent 2019-07-06 00:09:42 -05:00
parent 6493a5e10e
commit 845373e049
2 changed files with 13 additions and 0 deletions

View File

@ -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
$<$<CXX_COMPILER_ID:Clang>:c++fs>
$<$<CXX_COMPILER_ID:GNU>:stdc++fs>
${BOOST_LIBS}
)
set_property(
TARGET

View File

@ -15,6 +15,10 @@
#include "filesystem.hpp"
#ifdef OX_USE_BOOSTFS
using std::filesystem = boost::filesystem;
#endif
namespace ox {
/**