| 1 |
|
|---|
| 2 | # - Try to find PointGrey Research (PGR) Ladybug library
|
|---|
| 3 | #
|
|---|
| 4 | # Once done this will define
|
|---|
| 5 | # LADYBUG_FOUND - system has PGR Ladybug camera installed
|
|---|
| 6 | # LADYBUG_INCLUDE_DIR - the Ladybug include directory
|
|---|
| 7 | # LADYBUG_LIB_DIR - the Ladybug lib directory
|
|---|
| 8 | # LADYBUG_LIBRARIES - the ladybug libraries
|
|---|
| 9 |
|
|---|
| 10 | IF(WIN32)
|
|---|
| 11 | SET(LADYBUG_ROOT_DIR "$ENV{LADYBUG_ROOT}")
|
|---|
| 12 | ELSE(WIN32)
|
|---|
| 13 | SET(LADYBUG_ROOT_DIR
|
|---|
| 14 | /usr/local # Linux: default dir by CMake
|
|---|
| 15 | /usr # Linux
|
|---|
| 16 | /opt/local # OS X: default MacPorts location
|
|---|
| 17 | )
|
|---|
| 18 | ENDIF(WIN32)
|
|---|
| 19 |
|
|---|
| 20 | FIND_PATH(LADYBUG_INCLUDE_DIR
|
|---|
| 21 | NAMES "ladybug.h" "ladybuggeom.h" "ladybugGPS.h" "ladybugImageAdjustment.h" "ladybugrenderer.h" "ladybugsensors.h" "ladybugstream.h" "ladybugvideo.h" "pgrcameragui.h"
|
|---|
| 22 | PATHS "${LADYBUG_ROOT_DIRS}/include/"
|
|---|
| 23 | )
|
|---|
| 24 |
|
|---|
| 25 | FIND_PATH(LADYBUG_LIB_DIR
|
|---|
| 26 | NAMES "ladybug.lib" "LadybugGUI.lib"
|
|---|
| 27 | PATHS "${LADYBUG_ROOT_DIRS}/lib/"
|
|---|
| 28 | )
|
|---|
| 29 |
|
|---|
| 30 | if(WIN32)
|
|---|
| 31 | find_library(LADYBUG_LIBRARIES
|
|---|
| 32 | NAMES "ladybug" "LadybugGUI"
|
|---|
| 33 | PATHS "${LADYBUG_ROOT_DIR}/lib"
|
|---|
| 34 | )
|
|---|
| 35 | else(WIN32)
|
|---|
| 36 | find_library(LADYBUG_LIBRARIES
|
|---|
| 37 | NAMES "ladybug" "LadybugGUI"
|
|---|
| 38 | PATHS "${LADYBUG_ROOT_DIR}/lib"
|
|---|
| 39 | )
|
|---|
| 40 | endif(WIN32)
|
|---|
| 41 |
|
|---|
| 42 | message ("******* LIBS: ${LADYBUG_LIBRARIES} ********")
|
|---|
| 43 |
|
|---|
| 44 | if(EXISTS "${LADYBUG_INCLUDE_DIR}")
|
|---|
| 45 | set(LADYBUG_FOUND TRUE CACHE BOOL "" FORCE)
|
|---|
| 46 | else()
|
|---|
| 47 | set(LADYBUG_FOUND FALSE CACHE BOOL "" FORCE)
|
|---|
| 48 | endif()
|
|---|
| 49 |
|
|---|
| 50 | # display help message
|
|---|
| 51 | #IF(NOT BumbleBeeXB3_FOUND)
|
|---|
| 52 | # # make FIND_PACKAGE friendly
|
|---|
| 53 | # IF(BumbleBeeXB3_FIND_REQUIRED)
|
|---|
| 54 | # MESSAGE(FATAL_ERROR "BumbleBeeXB3 not found. Please specify the location of the PGR and Triclops files with the BumbleBeeXB3_ROOT_DIR env. variable.")
|
|---|
| 55 | # ELSE(OpenCV2_FIND_REQUIRED)
|
|---|
| 56 | # MESSAGE(STATUS "BumbleBeeXB3 not found.")
|
|---|
| 57 | # ENDIF(BumbleBeeXB3_FIND_REQUIRED)
|
|---|
| 58 | #ENDIF(NOT BumbleBeeXB3_FOUND)
|
|---|