if(WIN32)
# On Windows/MinGW we need to use 'thread_win32' instead of 'thread'.
# The library is named libboost_thread_win32* (not libboost_thread*).
- find_package(Boost 1.42 COMPONENTS system thread_win32 REQUIRED)
+ find_package(Boost 1.42 COMPONENTS filesystem system thread_win32 REQUIRED)
else()
- find_package(Boost 1.42 COMPONENTS system thread REQUIRED)
+ find_package(Boost 1.42 COMPONENTS filesystem system thread REQUIRED)
endif()
#===============================================================================
#include "inputfile.h"
#include "sessionfile.h"
+#include <boost/filesystem.hpp>
+
#include <libsigrok/libsigrok.h>
using std::string;
std::string File::format_device_title() const
{
- return _path;
+ return boost::filesystem::path(_path).filename().string();
}
File* File::create(const string &name)
if(WIN32)
# On Windows/MinGW we need to use 'thread_win32' instead of 'thread'.
# The library is named libboost_thread_win32* (not libboost_thread*).
- find_package(Boost 1.42 COMPONENTS system thread_win32 unit_test_framework REQUIRED)
+ find_package(Boost 1.42 COMPONENTS filesystem system thread_win32 unit_test_framework REQUIRED)
else()
- find_package(Boost 1.42 COMPONENTS system thread unit_test_framework REQUIRED)
+ find_package(Boost 1.42 COMPONENTS filesystem system thread unit_test_framework REQUIRED)
endif()