-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (43 loc) · 1.19 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 2.8.3)
project(pixy2_ros)
include(FindPkgConfig)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
image_transport
)
if (PKG_CONFIG_FOUND)
pkg_check_modules(LIBUSB QUIET libusb-1.0)
if (LIBUSB_INCLUDE_DIRS)
MESSAGE("*** libusb FOUND")
SET(DEPS "${DEPS} libusb-1.0-0")
else()
MESSAGE("*** libusb NOT FOUND")
endif()
endif()
find_package(OpenCV REQUIRED)
FIND_PACKAGE( Boost 1.40 COMPONENTS thread REQUIRED )
catkin_package()
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
include_directories(include ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} )
include_directories(${LIBUSB_INCLUDE_DIRS})
link_directories( ${LIBUSB_LIBRARY_DIRS})
add_executable( pixy2_cam
src/erle_pixy.cpp
src/helpFunctions.cpp
src/pixycam.cpp
src/usblink.cpp
src/chirpmon.cpp
src/common/chirp.cpp
)
target_link_libraries(pixy2_cam
${LIBUSB_LIBRARIES}
${OpenCV_LIBRARIES}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
install(TARGETS pixy2_cam
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)