bloomberg/bde-tools

interface_target add link library produce CMake error

Closed this issue · 5 comments

I am trying to add a library to a package following the instructions in here.

However, after I add a library defined in my CMake, CMake produces an error that says:
CMake Error: install(EXPORT "hblInterfaceTargets" ...) includes target "hblr-PRIVATE" which requires target "XXX" that is not in any export set.
The XXX above is the library I am trying to add.

How can I fix this error?

Can you share the full code snippets? Or, rather create a library skeleton with no code payload ( a single component with fake functionality) and share it on GitHub. It is hard to isolate the cause of this error without having full code and repo layout. Likely there are some missing dependencies.

Can you share the full code snippets? Or, rather create a library skeleton with no code payload ( a single component with fake functionality) and share it on GitHub. It is hard to isolate the cause of this error without having full code and repo layout. Likely there are some missing dependencies.

I create a demo here: https://github.com/Scicomath/bde_demo

Will have a access to a computer tomorrow(for testing), but hbl.dep file missing my_add dependency ( single line "my_add").

I've created a PR that illustrates the addition of the library:
Scicomath/bde_demo#1

Note that I had to guess the initial intention of this sample code. my guess if that you have "non structured" library that you want to build as part of the repo and link to one of the package libraries.

Closing the issue as we do not receive any feedback from the requester.