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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ekilmer
Copy link

@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
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

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.

1 participant