CMake-2
CMake简明教程
CMake问题汇总
引用动态库和静态库
动态库的添加
1
2link_directories(${PROJECT_SOURCE_DIR}/lib) #添加动态连接库的路径
target_link_libraries(${PROJECT_NAME} mxnet ) #添加libmxnet.so静态库的添加
1
2link_directories(${PROJECT_SOURCE_DIR}/lib)
target_link_libraries(${PROJECT_NAME} mxnet )1
2
3add_library(mxnet STATIC IMPORTED)
set_property(TARGET mxnet PROPERTY IMPORTED_LOCATION /path/to/libmxnet.a)
target_link_libraries(${PROJECT_NAME} mxnet ) #添加libmxnet.a
CMake-2
https://www.spacezxy.top/2022/03/13/CMake/CMake-2/