On Sun, 15 Feb 09 15:15, Michael Jackson wrote: > Two things are needed: 1) Add the headers to the target and 2) use the > "source_group" command to group them together. > > This should work. > > set(LIB1_SRCS MyLibrary1.h MyLibrary1.cpp ) > source_group(Library1 FILES ${LIB1_SRCS} ) > add_library(MyLibrary1 ${LIB1_SRCS})
You can also use regular expressions if you want. E.g. source_group("robocup" REGULAR_EXPRESSION "robocup/src/[^/]+$") It's a bit sad, that source_group("" REGULAR_EXPRESSION "src/[^/]+$") doesn't place source and header in the root of the project, but again in the header and source folders. See [0] Greetings, Armin [0] http://www.cmake.org/Bug/view.php?id=8163 _______________________________________________ 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