|
|
|
cmake_minimum_required(VERSION 3.0.2)
|
|
|
|
project(Air_Ground_CEC)
|
|
|
|
|
|
|
|
## Compile as C++11, supported in ROS Kinetic and newer
|
|
|
|
add_compile_options(-std=c++11)
|
|
|
|
|
|
|
|
|
|
|
|
find_package(catkin REQUIRED COMPONENTS
|
|
|
|
roscpp
|
|
|
|
std_msgs
|
|
|
|
cv_bridge
|
|
|
|
sensor_msgs
|
|
|
|
image_transport
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
|
|
catkin_package(
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
###########
|
|
|
|
## Build ##
|
|
|
|
###########
|
|
|
|
|
|
|
|
#set(OpenCV_DIR /usr/local/share/opencv4)
|
|
|
|
find_package(OpenCV REQUIRED)
|
|
|
|
find_package(Qt5 REQUIRED COMPONENTS Widgets )
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/ui/*.ui)
|
|
|
|
file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/resources/*.qrc)
|
|
|
|
file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
FOLLOW_SYMLINKS src/include/Air_Ground_CEC/*.hpp *.h)
|
|
|
|
file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
FOLLOW_SYMLINKS src/*.cpp)
|
|
|
|
|
|
|
|
QT5_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES})
|
|
|
|
QT5_WRAP_UI(QT_FORMS_HPP ${QT_FORMS})
|
|
|
|
QT5_WRAP_CPP(QT_MOC_HPP ${QT_MOC})
|
|
|
|
|
|
|
|
## Specify additional locations of header files
|
|
|
|
## Your package locations should be listed before other locations
|
|
|
|
include_directories(
|
|
|
|
include/Air_Ground_CEC
|
|
|
|
${catkin_INCLUDE_DIRS}
|
|
|
|
${OpenCV_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(Air_Ground_CEC ${QRC_FILES} ${QT_SOURCES}
|
|
|
|
${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
|
|
|
|
|
|
|
|
target_link_libraries(Air_Ground_CEC
|
|
|
|
Qt5::Widgets
|
|
|
|
${catkin_LIBRARIES}
|
|
|
|
${OpenCV_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|