I have just started using QtCreator. When I open a CMake project in QtCreator, all of my cpp files mentioned in the CMakeLists.txt are added to the "project". However, my headers (.h) and template implementation (.hpp) are not added to the project (I believe this is the same behavior as Visual Studio). I have seen this thread: http://www.cmake.org/pipermail/cmake/2003-January/003274.html that says you can simply add the headers to the add_executable/add_library line:
add_library(MyProject main.cpp MyClass.h MyClass.cpp) This works fine. However, I have several projects that are "template only" (there are no .cpp files), and I essentially only use them as git submodules, so there are actually no driver cpp files either (the drivers are in the project that includes the submodule). That is, the complete directory looks like this: MyProject/CMakeLists.txt MyProject/MyProject.h Because of this, I can't use add_executable or add_library at all. Is there another command that can get CMake to add these files to the project? Thanks, David
-- 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
