在编译过程中某些头文件都没有找到,虽然我加入了相应的包括CMake的目录。不幸的是这是代码和目录结构我坚持,我不能改变在包括语句什么。加根目录包括目录
我有以下目录结构:
CMakeLists在projectfolder看起来是这样的:
project (project)
include_directories(includefolder)
add_subdirectory(source1)
prog.cpp有:
#include "source1_include/header.h"
和header.h有:
#include "anotherHeader.h"
(不要问我为什么,我不知道我自己,也许有事情做的事实,原来这是一个Visual Studio项目)
我想加入我能解决这个问题,
include_directories(.)
到source1目录中的CMakeLists,但不幸的是它不会那样工作。 anotherHeader.h未找到。