【学习cmake】cmake如何使用链接库 (link_directories, LINK_LIBRARIES, target_link_libraries,FIND_PACKAGE)实践篇2
cmake中添加引用动态链接和静态链接库ADD_EXECUTABLE(a.out./main.cpp)TARGET_LINK_LIBRARIES(a.out/usr/lib/libeg.so)动态库的添加:link_directories(${PROJECT_SOURCE_DIR}/lib)#添加动态连接库的路径target_link_libraries(project_name-lmxnet)#