google / google/prefab

Header only module question

Open
#124 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
236
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Hi! I have a question for which I can't find answer elsewhere. First time using it, so maybe my question is stupid.

I have a package with 3 modules. One of them have libs and headers (A), one have only libs (B) and one have only headers (C).

In `module.json` of module A I try to export both other modules with `"export_libraries" : [":B", ":C"]`. Module B and module C have empty `export_libraries`.
Now, my problem is that when in `CMakeLists.txt` in project I add `find_package (package REQUIRED CONFIG)` and `target_link_libraries(... package::A)`, header of module C is not found. Module B is found correctly and it works. If I do `target_link_libraries(... package::A package::C)` everything works.

Does `export_libraries` works only for modules with static and shared libraries? Or I need to do something else to export all modules together, so I can link only one?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.