A while ago, we (vector35) added fmt as a dependency in the binaryninja-api and that is breaking the binexport build. I made two fixes to it so the build can work. The two fixes are:
when cloning the binaryninja-api repo, recursively clone all submodules. This will include the fmt library which is necessary for it to build. The reason that I did not specify this fmt library explicity in the CMake is that will break the build for people trying to build against an earlier version of BN, e.g., the stable 3.5, which is before we introduced the fmt into the binaryninja-api. The tradeoff is several unnecessary submodules will also be cloned, but I think that is a reasonable tradeoff.
I include binaryninjacore.h instead of the binaryninjaapi.h in the binaryninjacore.cc. binaryninjaapi.h references fmt as well as many other irrelevant things for the purpose of building a substitute binaryninjacore, so I included the binaryninjacore.h which has less distractions.
A while ago, we (vector35) added fmt as a dependency in the binaryninja-api and that is breaking the binexport build. I made two fixes to it so the build can work. The two fixes are:
binaryninjacore.h
instead of thebinaryninjaapi.h
in thebinaryninjacore.cc
.binaryninjaapi.h
references fmt as well as many other irrelevant things for the purpose of building a substitute binaryninjacore, so I included thebinaryninjacore.h
which has less distractions.I am testing against the Jordan's binexport build script: https://gist.github.com/psifertex/31d9bc3167eca91e466ebaae4382521c, though I believe it should also fix the build for other script or workflow.