【发布时间】:2012-06-14 06:29:07
【问题描述】:
我的项目目录包含一个CMakeLists.txt 文件以及其根目录下的src 和include 目录。 src 还包含它自己的CMakeLists.txt,它由根处的那个链接。有没有办法可以指定 CMake 设置默认的全局构建目录,以便 src/CMakeLists.txt 中的语法接近以下?
include_directories(include)
add_executable(first main.cpp foo.cpp)
add_executable(second bar.cpp)
我想建立这个目录树:
CMakeLists.txt
src/
CMakeLists.txt
main.cpp
foo.cpp
bar.cpp
include/
...
bin/ (or build/)
first
second
【问题讨论】:
标签: cmake