On Mar 3, 2009, at 5:26 AM, Eric Noulard wrote:

2009/3/3 Michael Schantin <[email protected]>:
Hello,

is there a possibility to generate those "filters" (a.k.a.
subdirectories in .vcproj files) using CMake? I managed to generate
several CMakeLists.txt files. One resides in the root directory, the
other ones in subdirectories. They are included like this:

INCLUDE(${PROJECT_SOURCE_DIR}/mySubDir1/CMakeLists.txt)
INCLUDE(${PROJECT_SOURCE_DIR}/mySubDir2/CMakeLists.txt)

You usually don't "INCLUDE" CMakeLists.txt
you usually ADD_SUBDIRECTOR

That depends on the context in which you use 'include'. Say you have some cmake files that just contain some common cmake code or some macros, then using the 'include' command is just fine.

If you have a CMakeLists.txt file that starts off with project() then it may be better to use the "add_subdirectory'

Just saying for clarity.

---
Mike Jackson                 www.bluequartz.net



_______________________________________________
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