From a28786097da1096e29b3951db745d18fead7093c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 6 Dec 2019 20:26:49 +0100 Subject: Fix for bba to make it portable --- bba/bba.cmake | 2 +- bba/main.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'bba') 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 +#include #include #include #include @@ -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) -- cgit v1.2.3