考虑以下CMakeLists.txt
文件:
add_subdirectory(execA)
add_subdirectory(libB)
install(TARGETS execA libB
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
我收到以下错误:
install TARGETS given target "execA" which does not exist in this
directory
execA
并libB
具有自己的CMakeList.txt
文件,位于project
目录以及我正在运行的构建目录cmake
(cmake ..
)下:
project
|------ CMakeList.txt (the one with the code)
|----execA
| \- .cpp, .hpp and CMakelist.txt
|----libB
| \- .cpp, .hpp and CMakelist.txt
|---- lib
|---- bin
\---- build (where I´m commanding: $ cmake ..
如何解决此错误?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句