Skip to content
Snippets Groups Projects
Commit eedce73c authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Update Find cmake with correct paths and path order

parent a343603e
No related branches found
No related tags found
No related merge requests found
Pipeline #5354 passed
FIND_PATH(firewire_camera_INCLUDE_DIRS firewirecamera.h firewireserver.h firewireexceptions.h ptg_camera.h bumblebee.h ladybug.h /usr/local/include/iri/firewire_camera /usr/include/iri/firewire_camera)
SET(name battery_monitor)
#edit the following line to add the librarie's header files
SET(header_files firewirecamera.h firewireserver.h firewireexceptions.h ptg_camera.h bumblebee.h ladybug.h)
FIND_LIBRARY(firewire_camera_LIBRARIES
NAMES firewire_camera
PATHS /usr/local/lib/iri/firewire_camera /usr/lib/iri/firewire_camera)
FIND_PATH(${name}_INCLUDE_DIRS ${header_files} /usr/local/include/iri/${name} /usr/include/iri/${name})
FIND_LIBRARY(${name}_LIBRARIES
NAMES ${name}
PATHS /usr/local/lib/iri/${name} /usr/lib/iri/${name})
SET(firewire_camera_INCLUDE_DIR ${firewire_camera_INCLUDE_DIRS})
SET(firewire_camera_LIBRARY ${firewire_camera_LIBRARIES})
SET(${name}_INCLUDE_DIR ${${name}_INCLUDE_DIRS})
SET(${name}_LIBRARY ${${name}_LIBRARIES})
IF (firewire_camera_INCLUDE_DIRS AND firewire_camera_LIBRARIES)
SET(firewire_camera_FOUND TRUE)
ENDIF (firewire_camera_INCLUDE_DIRS AND firewire_camera_LIBRARIES)
IF (${name}_INCLUDE_DIRS AND ${name}_LIBRARIES)
SET(${name}_FOUND TRUE)
ENDIF (${name}_INCLUDE_DIRS AND ${name}_LIBRARIES)
IF (firewire_camera_FOUND)
IF (NOT firewire_camera_FIND_QUIETLY)
MESSAGE(STATUS "Found firewire_camera camera driver: ${firewire_camera_LIBRARIES}")
ENDIF (NOT firewire_camera_FIND_QUIETLY)
ELSE (firewire_camera_FOUND)
IF (firewire_camera_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find firewire_camera camera driver")
ENDIF (firewire_camera_FIND_REQUIRED)
ENDIF (firewire_camera_FOUND)
IF (${name}_FOUND)
IF (NOT ${name}_FIND_QUIETLY)
MESSAGE(STATUS "Found ${name}: ${${name}_LIBRARIES}")
ENDIF (NOT ${name}_FIND_QUIETLY)
ELSE (${name}_FOUND)
IF (${name}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find ${name}")
ENDIF (${name}_FIND_REQUIRED)
ENDIF (${name}_FOUND)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment