Skip to content
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

Draft: install include folders of plugins to sdk #2074

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

Conversation

ev1313
Copy link

@ev1313 ev1313 commented Jan 18, 2025

Partially fixes #2068 .

This assumes the headers are in "include" for all plugins - this is necessary since the INCLUDES argument of add_imhex_plugin may contain paths to third party libs, whose headers should not be copied.
To fix this I think it is necessary to add a second argument like "PRIVATE_INCLUDES", which is included, but not installed.

With this it possible to append the ui plugin for example:

INCLUDES
        $ENV{IMHEX_SDK_PATH}/lib/plugins/ui/

and to link against it:

LIBRARIES
        /usr/local/lib/imhex/plugins/ui.hexpluglib

In a follow-up in the CMake Template for plugins imho there should be fixed, that:

  • you can include plugin includes relative to the SDK Path
  • you can link plugins relative to the lib path + without the hexpluglib or hexplug extension

@WerWolv
Copy link
Owner

WerWolv commented Jan 18, 2025

Thank you! I did a quick and dirty fix for it yesterday but the way you did it is better.

One nit-pick, not all plugin includes should be included. We make the distinction between regular plugins (which are cmake module libraries) and library plugins (which are regular shared libraries). You can only ever link against the library plugins anyways so only those should be included. These plugins have the LIBRARY_PLUGIN set when defining them so you can check for IMHEX_PLUGIN_LIBRARY_PLUGIN in the add_imhex_plugin function

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.

[Bug] ImHex SDK does not contain headers for internal plugins
2 participants