EU_Robot_Group-D/test/CMakeLists.txt

93 lines
2.3 KiB
CMake

cmake_minimum_required(VERSION 3.0.2)
project(test)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
image_transport
cv_bridge
)
## System dependencies are found with CMake's conventions
find_package(OpenCV REQUIRED)
find_package(yaml-cpp REQUIRED)
###################################
## catkin specific configuration ##
###################################
catkin_package(
CATKIN_DEPENDS roscpp rospy std_msgs sensor_msgs image_transport cv_bridge
)
###########
## Build ##
###########
## Specify additional locations of header files
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
## Declare a C++ executable
add_executable(qr_code_detector src/QRcode.cpp)
add_executable(calibrationWebcam src/calibrationWebcam.cpp)
add_executable(arenaCalibration src/arenaCalibration.cpp)
add_executable(aruco_detector src/QRcode.cpp)
add_executable(arena_calibration src/arenaCalibration.cpp)
## Add cmake target dependencies of the executable
add_dependencies(qr_code_detector ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(arenaCalibration ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(qr_code_detector
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(calibrationWebcam
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(arenaCalibration
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
target_link_libraries(aruco_detector
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
yaml-cpp
)
target_link_libraries(arena_calibration
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
yaml-cpp
)
#############
## Install ##
#############
## Mark executables for installation
install(TARGETS qr_code_detector
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_test.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${catkin_LIBRARIES})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)