Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find system aravis library on Ubuntu 20 #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.16)
project(camera_aravis)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)

find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs image_transport camera_info_manager dynamic_reconfigure driver_base tf dynamic_reconfigure)
find_package(Aravis REQUIRED)
find_package(GLIB2 REQUIRED)

generate_dynamic_reconfigure_options(cfg/CameraAravisConfig.cfg)

catkin_package(
DEPENDS Aravis GLIB2
CATKIN_DEPENDS roscpp sensor_msgs image_transport camera_info_manager dynamic_reconfigure driver_base tf
INCLUDE_DIRS
LIBRARIES
)

include_directories(cfg/cpp ${catkin_INCLUDE_DIRS} ${ARAVIS_INCLUDE_PATH} ${GLIB2_INCLUDE_DIRS})

message(${ARAVIS_LIBRARY})
include_directories(cfg/cpp ${catkin_INCLUDE_DIRS} ${Aravis_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS})

add_executable(camnode src/camnode.cpp)

target_link_libraries(camnode ${catkin_LIBRARIES} ${ARAVIS_LIBRARY} glib-2.0 gmodule-2.0 gobject-2.0)
target_link_libraries(camnode ${catkin_LIBRARIES} ${Aravis_LIBRARY} glib-2.0 gmodule-2.0 gobject-2.0)
add_dependencies(camnode ${PROJECT_NAME}_gencfg)
14 changes: 8 additions & 6 deletions CMakeModules/FindAravis.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
INCLUDE(FindPackageHandleStandardArgs)

FIND_PATH(ARAVIS_INCLUDE_PATH arv.h
"$ENV{ARAVIS_INCLUDE_PATH}"
FIND_PATH(Aravis_INCLUDE_DIRS arv.h
"$ENV{ARAVIS_INCLUDE_DIRS}"
/usr/include/aravis-0.6
/usr/local/include/aravis-0.6
)

FIND_LIBRARY(ARAVIS_LIBRARY aravis-0.6
FIND_LIBRARY(Aravis_LIBRARY aravis-0.6
"$ENV{ARAVIS_LIBRARY}"
/usr/lib
/usr/local/lib
)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(ARAVIS DEFAULT_MSG
ARAVIS_INCLUDE_PATH
ARAVIS_LIBRARY)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Aravis DEFAULT_MSG
Aravis_INCLUDE_DIRS
Aravis_LIBRARY)

3 changes: 1 addition & 2 deletions cfg/CameraAravisConfig.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

PACKAGE='camera_aravis'
import roslib; roslib.load_manifest(PACKAGE)
PACKAGE = 'camera_aravis'

from dynamic_reconfigure.parameter_generator import *
from driver_base.msg import SensorLevels
Expand Down
18 changes: 10 additions & 8 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>camera_info_manager</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>driver_base</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>libaravis-dev</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>tf</build_depend>

<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>camera_info_manager</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>driver_base</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>libaravis</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>tf</run_depend>

</package>