代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.21)
project(GLIA_ART)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
# set(CMAKE_VERBOSE_MAKEFILE ON)
# 自动调用moc,uic,rcc处理qt的扩展部分
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_PREFIX_PATH /home/jack-chen/root/)
# 设置采集卡驱动路径
set(ART_DIR "lib")
# 调用MVS库函数
set(MVS_INCLUDE /opt/MVS/include)
set(MVS_SO /opt/MVS/lib/64)
# 调用ROOT绘图库
find_package(ROOT 6.26 CONFIG REQUIRED)
# 调用Qt库函数
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
REQUIRED)
find_package(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(${MVS_INCLUDE})
link_directories(${MVS_SO})
#include_directories(${ART_DIR})
link_directories(${ART_DIR}) # 导入采集卡头文件路径
include("${ROOT_USE_FILE}")
separate_arguments(ROOT_EXE_LINKER_FLAGS)
set(SOURCE_FILES main.cpp mainwindow.cpp mainwindow.h mainwindow.ui
ART/artwindow.cpp ART/artwindow.h ART/artwindow.ui
cam/CamWindow.cpp cam/CamWindow.h cam/camwindow.ui
MvCamera/MvCamera.cpp MvCamera/MvCamera.h
canvas/canvas.cpp canvas/canvas.h
algorithm/algorithm.cpp algorithm/algorithm.h)
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} libMvCameraControl.so libusb3106A.so)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Gui)
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
target_link_libraries(${PROJECT_NAME} ${ROOT_LIBRARIES} ${ROOT_EXE_LINKER_FLAGS})
target_link_libraries(${PROJECT_NAME} stdc++fs)
# target_link_libraries(${PROJECT_NAME} ) # 链接采集卡动态库
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。