aboutsummaryrefslogtreecommitdiffstats
path: root/bba
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-12-06 20:26:49 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2019-12-06 20:26:49 +0100
commita28786097da1096e29b3951db745d18fead7093c (patch)
tree8eadceff4aa008a9ed221ef32fd14146b01a7603 /bba
parentb8636902e3c943b52feca2414b3a66e8aad5a2f4 (diff)
downloadnextpnr-a28786097da1096e29b3951db745d18fead7093c.tar.gz
nextpnr-a28786097da1096e29b3951db745d18fead7093c.tar.bz2
nextpnr-a28786097da1096e29b3951db745d18fead7093c.zip
Fix for bba to make it portable
Diffstat (limited to 'bba')
-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)