Skip to content

install library and header#289

Open
christianrauch wants to merge 2 commits into
xioTechnologies:mainfrom
christianrauch:fusion_includes
Open

install library and header#289
christianrauch wants to merge 2 commits into
xioTechnologies:mainfrom
christianrauch:fusion_includes

Conversation

@christianrauch
Copy link
Copy Markdown

@christianrauch christianrauch commented Jan 8, 2026

This extends the CMake instructions to install the library and header files for Fusion. It also sets enables PIC..

The definition of the BUILD_INTERFACE and INSTALL_INTERFACE in target_include_directories fixes issues such as:

CMake Error in [...]/_deps/madgwick_fusion-src/Fusion/CMakeLists.txt:
  Target "Fusion" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "[...]/_deps/madgwick_fusion-src/Fusion/."

  which is prefixed in the build directory.

when the repo is used via CMake's FetchContent.

Enabling PIC fixes issues such as:

/usr/bin/ld: ../_deps/madgwick_fusion-build/Fusion/libFusion.a(FusionAhrs.c.o): warning: relocation against `fusionAhrsDefaultSettings' in read-only section `.text'
/usr/bin/ld: ../_deps/madgwick_fusion-build/Fusion/libFusion.a(FusionAhrs.c.o): relocation R_X86_64_PC32 against symbol `fusionAhrsDefaultSettings' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value

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