From 7374a06faad4b9fa6b5640b21e84f67ec18455bb Mon Sep 17 00:00:00 2001 From: iTrooz Date: Fri, 5 Dec 2025 12:02:39 +0100 Subject: [PATCH] fix: Linux SDK looking for files in the wrong place + update doc on building SDK (#2537) --- README.md | 13 ++++++++++++- cmake/sdk/CMakeLists.txt | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 266a4086f..cdcc70f0c 100644 --- a/README.md +++ b/README.md @@ -375,9 +375,20 @@ For more information, check out the [Compiling](/dist/compiling) guide. ## Contributing See [Contributing](/CONTRIBUTING.md) -## Plugin development +## Plugin development To develop plugins for ImHex, use the following template project to get started. You then have access to the entirety of libimhex as well as the ImHex API and the Content Registry to interact with ImHex or to add new content. +To build a plugin, you will need to use our SDK + +### Getting the SDK locally +You can build the SDK by compiling ImHex like this: +- `cmake -G Ninja -DIMHEX_BUNDLE_PLUGIN_SDK=ON -B build` +- `cd build` +- `DESTDIR=install ninja install` +The SDK will then be available at `install/usr/local/share/imhex/sdk`. You will need to set the variable `IMHEX_SDK_PATH` to that (absolute) path. + +### Getting the SDK in a Github Actions CI +You can use [this action](https://github.com/WerWolv/imhex-download-sdk) to automatically download the SDK to your Github Runner - [ImHex Plugin Template](https://github.com/WerWolv/ImHex-Plugin-Template) diff --git a/cmake/sdk/CMakeLists.txt b/cmake/sdk/CMakeLists.txt index 9ae8e5301..5c2cc157e 100644 --- a/cmake/sdk/CMakeLists.txt +++ b/cmake/sdk/CMakeLists.txt @@ -65,9 +65,9 @@ elseif (APPLE) INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/trace/include") else() set_target_properties(libimhex PROPERTIES - IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libimhex.so" + IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib/libimhex.so" INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/libimhex/include") set_target_properties(tracing PROPERTIES - IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../libtracing.a" + IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib/libtracing.a" INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/lib/trace/include") endif()