Hello,
great. This is working like a charm. I am now using
ADD_SUBDIRECTORY(mySubDir1)
ADD_SUBDIRECTORY(mySubDir2)
SOURCE_GROUP("Source Files\\mySubDir1" FILES myFirstFileInFirstDir.cpp
mySecondFileInFirstDir.cpp)
SOURCE_GROUP("Source Files\\mySubDir2" FILES
myFirstFileInSecondDir.cpp mySecondFileInSecondDir.cpp)
This works great. Hopefully all my Visual Studio projects Source Files
are named "Source Files".
2009/3/3 Eric Noulard <[email protected]>:
> 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_SUBDIRECTORY
>
>> Now I would like to have those files from mySubDir1 appear in the
>> Visual Studio project in a seperate filter called mySubDir1. How do I
>> do that?
>
> Did you try the "SOURCE_GROUP" command?
>
>
> --
> Erk
--
Michael
_______________________________________________
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