Help: Improve cmake-buildsystem(7) header-only library example
The Eigen example for INTERFACE target header-only library is misleading: INTERFACE file scope should be PUBLIC?
The example given for a header-only INTERFACE library uses target_sources
to put the header files into the INTERFACE
scope: https://cmake.org/cmake/help/git-stage/manual/cmake-buildsystem.7.html#interface-libraries
But the issue for making INTERFACE
libraries first-class build system targets refers to adding PUBLIC_HEADER
files: #19145 (closed)
In my own experience, adding header files to the INTERFACE
scope is not what I want, because then they don't appear under the target that 'owns' them in the IDE. PUBLIC
does what I want and expect.
Edited by Brad King