[CMake] How to add non-source files to a Visual Studio project?
Eric Noulard
eric.noulard at gmail.com
Fri Oct 17 05:11:20 EDT 2008
2008/10/17 Andrew Fenn <andrewfenn at gmail.com>:
> This method will generate a visual studio sln with the project lib1 inside.
>
> Whatever you want to add to the project lib1 put it into lib1_source
> before it calls add_library(lib1, [source files])
Yes now I understand, the fact is the "non sources files" do
not really belong to a single library, and are located in a separate directory.
But you are right the fact is I may add those files to
any of the lib1/lib2/app1/app2 as source "HEADER_FILE_ONLY"
and it works they appear in the appropriate target in Visual Studio.
The fact is I didn't want (in the first place) to add those files there
but I'd rather want to create a "non buildable target" called "InitFile"
which only contains non-buildable/compilable files.
This does not seem to be possible, may be it's not reasonable too :-)
--
Erk
More information about the CMake
mailing list