我不想编译外部库:
它适用于源的完整路径,如:
add_library(timetool "../src/wnt/foo.cxx"
"../../../../include/foo.h"
它没有' T工作
add_library(timetool "../src/wnt/*.cxx"
"../../../../include/*.h"
我收到错误消息:
CMake Error at CMakeLists.txt:25 (add_library):
Cannot find source file:
../src/*.cxx
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx
我该怎么做才能解决问题?
答案 0 :(得分:0)
这就是解决方案!函数add_library
file(GLOB timetool_SRC "../src/wnt/*.cxx"
"../../../../include/*.h"
add_library(timetool ${timetool_SRC}