我有两个与cmake相关的问题:首先,我无法使它在include文件夹中找到包含,并且它找不到main.cpp文件,除非将它放在同一目录中作为CMakeLists.txt。你能帮我么?cmake目录问题
我有以下的目录结构:
/TRT
|
+--- /src (bunch of .cpp files here)
|
+--- /include (header files here)
的的CMakeLists.txt位于/ TRT,main.cpp中位于/ TRT/src,则包括在/ TRT/SRC /包括。
我写了下面的CMakeLists.txt并把它放在/ TRT:
cmake_minimum_required(VERSION 2.6)
project(TRT)
add_subdirectory(src)
include_directories($(TRT_SOURCE_DIR)/include)
add_executable(trt main)
target_link_libraries(glut)
在此先感谢
那里做ü想要把你的main.cpp?在src中?包括它是在同一级作为src或在src? – 2009-11-09 18:20:32
嗨Nadir,感谢您的评论,我已澄清我的帖子。 – 2009-11-10 20:01:59