My project directory contains a CMakeLists.txt
file and src
and include
directories at its root. src
also contains its own CMakeLists.txt
, which is linked by the one at the root. Is there a way I can specify to CMake to set a default global build directory so that the syntax in src/CMakeLists.txt
is close to the following?
include_directories(include)
add_executable(first main.cpp foo.cpp)
add_executable(second bar.cpp)
I would like this directory tree to be built:
CMakeLists.txt
src/
CMakeLists.txt
main.cpp
foo.cpp
bar.cpp
include/
...
bin/ (or build/)
first
second