Make Cycles compatible with older boost versions.

Patch by IRIE Shinsuke, thanks!
This commit is contained in:
2012-07-25 20:25:47 +00:00
parent 06a9482986
commit 8ad3e73965
2 changed files with 16 additions and 0 deletions

View File

@@ -26,6 +26,10 @@ OIIO_NAMESPACE_USING
#include <stdio.h>
#if (BOOST_VERSION < 104400)
# define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
@@ -58,7 +62,11 @@ string path_user_get(const string& sub)
string path_filename(const string& path)
{
#if (BOOST_FILESYSTEM_VERSION == 2)
return boost::filesystem::path(path).filename();
#else
return boost::filesystem::path(path).filename().string();
#endif
}
string path_dirname(const string& path)