floooh / fips

High-level build system for distributed, multi-platform C/C++ projects.
MIT License
471 stars 82 forks source link

Support header-only (interface) targets #224

Open mattiasljungstrom opened 5 years ago

mattiasljungstrom commented 5 years ago

similar to this cmake setup:

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

floooh commented 5 years ago

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.