Skip to content

cmake: binaryninjaui depends on binaryninjaapi #6822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ekilmer
Copy link
Contributor

@ekilmer ekilmer commented May 10, 2025

Fixes building the uinotification example that only links against binaryninjaui.

Without this fix, there's a compilation error about not finding binaryninjaapi.h:

In file included from binaryninja-api/examples/uinotification/uinotification.cpp:2:
In file included from binaryninja-api/examples/uinotification/uinotification.h:3:
binaryninja-api/ui/uicontext.h:8:10: fatal error: 'binaryninjaapi.h' file not found
    8 | #include "binaryninjaapi.h"
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.

Fixes building the uinotification example that only links against
`binaryninjaui`.

Without this fix, there's a compilation error about not finding
`binaryninjaapi.h`:

```
In file included from binaryninja-api/examples/uinotification/uinotification.cpp:2:
In file included from binaryninja-api/examples/uinotification/uinotification.h:3:
binaryninja-api/ui/uicontext.h:8:10: fatal error: 'binaryninjaapi.h' file not found
    8 | #include "binaryninjaapi.h"
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.
```
@ekilmer
Copy link
Contributor Author

ekilmer commented May 10, 2025

The uinotification build error can be repeated when running the following commands on dev branch (assuming CMake can find the binaryninjaui shared library):

cmake -B build -S . -G Ninja -DHEADLESS:BOOL=OFF -DBN_API_BUILD_EXAMPLES:BOOL=ON
cmake --build build --target uinotification

@plafosse plafosse requested a review from CouleeApps May 27, 2025 12:31
@plafosse plafosse added this to the Helion milestone May 27, 2025
@fuzyll fuzyll assigned fuzyll and unassigned CouleeApps Jun 2, 2025
@fuzyll
Copy link
Contributor

fuzyll commented Jun 26, 2025

This was cherry-picked into my C++20 branch as c19bcd7, which was merged yesterday. Sorry for the wait, but thank you for the PR!

@fuzyll fuzyll closed this Jun 26, 2025
@ekilmer ekilmer deleted the fix-building-uinotification-example branch June 26, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants