cmake_minimum_required(VERSION 3.6)
project(imgClassification)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
find_package(OpenCV REQUIRED) #查找opencv包,需提前安装
add_library(mxnet SHARED IMPORTED)
set_property(TARGET mxnet PROPERTY IMPORTED_LOCATION "path/to/incubator-mxnet/lib/libmxnet.so")
include_directories(path/to/incubator-mxnet/include)
find_package(dlib REQUIRED) #需提前安装好dlib到系统中
set(SOURCE_FILES main.cpp)
add_executable(imgClassification ${SOURCE_FILES})
target_link_libraries(imgClassification
mxnet
${OpenCV_LIBS}
${dlib_LIBS}
)
cmake调用opencv、dlib和mxnet
最新推荐文章于 2024-08-15 11:57:42 发布