[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Tweak CMake project to include non-buildable files in the CodeBlocks project file
From: Andreas Pakulat <apaku () gmx ! de>
Date: 2015-01-12 10:40:22
Message-ID: CAExHGmTopxMJnHp=2N0w00km4jvph7Y5OD-S1YeymyFJY7Sc+w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
On Sun, Jan 11, 2015 at 10:55 PM, Dario Oliveri <oliveridario89@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
[Attachment #5 (text/html)]
<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan \
11, 2015 at 10:55 PM, Dario Oliveri <span dir="ltr"><<a \
href="mailto:oliveridario89@gmail.com" \
target="_blank">oliveridario89@gmail.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div>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):<br><br>---<br>set_source_files_properties( comment.txt \
PROPERTIES HEADER_FILE_ONLY true)<br>---<br></div>then you can include that file in \
the build to let it shows up in the IDE file<br><br>---<br></div><div>#example when \
adding a static library (works the same also for \
executables)<br></div><div>add_library( ${arg1} STATIC <br> ${sourcefiles} \
#files you need to REALLY BUILD<br></div> comment.txt #this file would be \
added, but not builded<br><div> \
)<br>---</div></div></blockquote><div><br></div><div>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 \
:)</div><div><br></div><div>Andreas</div></div></div></div>
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic