Knitschi / CPFCMake

A component of the CMakeProjectFramework. It provides the CMake code that implements a CI-pipeline.
MIT License
2 stars 2 forks source link

Invastigate if we have a problem with install( EXPORT when a library is linked to two other libraries. #53

Open Knitschi opened 5 years ago

Knitschi commented 5 years ago

It is possible that the current install(TARGET ... EXPORT ... ) does not work properly. In more complex projects with larger link trees then the ones in the CPF test projekts I experienced a problem where cmake fails with the error message that a target is exported more than once. This seems to be caused by the fact that all linked dependencies are also exported when using install(). Because of this the exported targets are added to all package export sets which seems to be not allowed.