I have a CMakeLists.txt that I use to generate Eclipse CDT project files for my project. Now I added a dependencie to my project that has its own CMakeLists.txt. In my own list file I added add_subdirectory("/myDep" EXCLUDE_FROM_ALL)
and target_link_libraries(myApp myDep)
.
Problem is that Eclipse complains that the subproject myDep is overlapping with the workspace because it's in the same workspace. With the result that I can't import the Eclipse CDT project file (and so I can't work on my program).
Now for the question: What's the correct way with cmake and Eclipse CDT of adding a source dependency to my project that should be compiled along with my app and then linked to my app and is a subfolder from my project?