[CMake] Tweak CMake project to include non-buildable files in the CodeBlocks project file
Andreas Pakulat
apaku at gmx.de
Mon Jan 12 05:40:22 EST 2015
Hi,
On Sun, Jan 11, 2015 at 10:55 PM, Dario Oliveri <oliveridario89 at gmail.com>
wrote:
> It is very simple for each of the files you want to include in the build
> (I use txt example so that you know it can work for arbitrary types):
>
> ---
> set_source_files_properties( comment.txt PROPERTIES HEADER_FILE_ONLY true)
> ---
> then you can include that file in the build to let it shows up in the IDE
> file
>
> ---
> #example when adding a static library (works the same also for executables)
> add_library( ${arg1} STATIC
> ${sourcefiles} #files you need to REALLY BUILD
> comment.txt #this file would be added, but not builded
> )
> ---
>
Ah, that works. Its a little ugly in the CMake files but I guess I can live
with that. Ideally I was hoping to simply have a 'complete' list including
actual sources and sources for other platforms and hand that to a special
function - without passing the source-for-other-platform to the actual
target. Oh well, I have to stop dreaming :)
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150112/862a20fc/attachment-0001.html>
More information about the CMake
mailing list