Cmake:linux中cmake添加动态库

参考:https://blog.csdn.net/zhuiyunzhugang/article/details/88142908

在COLMAP_ADD_EXECUTABLE选项下面添加 target_link_libraries(exe libname)

比如:

COLMAP_ADD_EXECUTABLE(colmap_exe colmap.cc)
target_link_libraries(colmap_exe /home/wishchin/workspace/CNN/libTensorflow/bin/libtensorflow_cc.so)
target_link_libraries(colmap_exe /usr/local/cuda-10.0/lib64/libcudnn.so)
target_link_libraries(colmap_exe /usr/local/cuda-10.0/lib64/libcusolver.so)
target_link_libraries(colmap_exe /usr/local/cuda-10.0/lib64/libcublas.so)
target_link_libraries(colmap_exe /usr/local/lib/libopencv_core.so)

可以编译运行成功,把tesorflow添加到工程中.

 

 

你可能感兴趣的:(C++编程,QT./Linux,三维重建/SLAM)