Olivier Delannoy <olivier.delan...@gmail.com> wrote:
> I would like to set include_directories on a per target basis. I
> understand that the INCLUDE_DIRECTORIES property is currently on a per
> folder basis. It is a bit of a problem as I would like to flatten my
> build and have all my targets generated in a single destination
> folder. Is there any way to achieve this currently?

The "per folder" basis refers to the source directories or folders.  You
don't need to flatten the entire source of your project in order to put
the built libraries and executables in one directory.  Instead, direct
the output of each target to the common directory.  For example, I have
a project under CMake that puts all the executable code in files in one
directory, but the source for each target is in a directory completely
separate from any other target's source directory.  (We don't even allow
one target's source to be in a subdirectory of another target.)  This
seems to me to be a sensible way to organize such a project even if you
were not using CMake.

David A. Karr

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to