I am currently working on a transition to a Visual C ++ project (which has several subprojects inside it) for CMake.
There is one thing I'm not sure about - basically, to include subprojects from the top-level CMakeLists.txt file, I simply use the add_subdirectory command and refer to the directories in which these various subprojects are stored.
However, I have one project that is in the same directory as my top-level CMakeLists.txt file, and so I wonder if it is possible to include this file anyway? CMake does not allow me to call add_subdirectory on an existing PROJECT_BINARY_DIR (see below):
add_subdirectory(${PROJECT_BINARY_DIR})
I cannot think of another way to include this subproject in my CMake assembly. Any ideas?
user1202422
source share