Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support header-only (interface) targets #224

Open
mattiasljungstrom opened this issue May 21, 2019 · 1 comment
Open

Support header-only (interface) targets #224

mattiasljungstrom opened this issue May 21, 2019 · 1 comment

Comments

@mattiasljungstrom
Copy link
Contributor

similar to this cmake setup:

add_library(lib1 INTERFACE)
target_sources(lib1 INTERFACE header_file.h)
target_include_directories(lib1 INTERFACE .)

@floooh
Copy link
Owner

floooh commented May 22, 2019

Not currently. If the header-only lib is in its own fips project you can export header-search paths, like here:

https://github.com/floooh/sokol/blob/master/fips.yml

The headers won't be added to IDE projects though. I think it's worth doing though, if fips detects that there are no source files in a library (only headers), it could create such a interface library (I need to check whether the cmake version requirement isn't too harsh though, I wanted to use such "empty targets" before, and add all sources with target_sources(), but this feature required a really recent cmake version.

@floooh floooh changed the title is there a way to do header only libs with fips_begin_lib? Support header-only (interface) targets May 22, 2019
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

No branches or pull requests

2 participants