aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bba/bba.cmake2
-rw-r--r--bba/main.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/bba/bba.cmake b/bba/bba.cmake
index a6995ca3..f1f5a754 100644
--- a/bba/bba.cmake
+++ b/bba/bba.cmake
@@ -5,7 +5,7 @@ ENDIF(CMAKE_CROSSCOMPILING)
IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(bbasm bba/main.cc)
- target_link_libraries(bbasm LINK_PUBLIC ${Boost_PROGRAM_OPTIONS_LIBRARY})
+ target_link_libraries(bbasm LINK_PUBLIC ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
ENDIF(NOT CMAKE_CROSSCOMPILING)
IF(NOT CMAKE_CROSSCOMPILING)
diff --git a/bba/main.cc b/bba/main.cc
index 9d7f9f8f..fc53a4d8 100644
--- a/bba/main.cc
+++ b/bba/main.cc
@@ -19,6 +19,7 @@
*/
#include <assert.h>
+#include <boost/filesystem/convenience.hpp>
#include <boost/program_options.hpp>
#include <iostream>
#include <map>
@@ -446,8 +447,7 @@ int main(int argc, char **argv)
fprintf(fileOut, "%s\n", s.c_str());
fprintf(fileOut, "const char %s[%d] =\n", streams[0].name.c_str(), int(data.size()) + 1);
- char *bin_basename_buf = strdup(files.at(2).c_str());
- fprintf(fileOut, "#embed_str \"%s\"\n", basename(bin_basename_buf));
+ fprintf(fileOut, "#embed_str \"%s\"\n",boost::filesystem::basename(files.at(2)).c_str());
fprintf(fileOut, ";\n");
for (auto &s : postText)