Added cmake DC1394 lookup

This commit is contained in:
Mathieu Labbe
2015-04-03 15:13:05 -04:00
parent 653248bde8
commit 4ca200fe1a
3 changed files with 52 additions and 0 deletions
+7
View File
@@ -135,6 +135,7 @@ ENDIF("${VTK_MAJOR_VERSION}" EQUAL 5)
FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(Freenect)
FIND_PACKAGE(OpenNI2)
FIND_PACKAGE(DC1394)
FIND_PACKAGE(G2O)
# If Qt is here, the GUI will be built
@@ -343,6 +344,12 @@ ELSE()
MESSAGE(STATUS " With OpenNI2 = NO (OpenNI2 not found)")
ENDIF()
IF(DC1394_FOUND)
MESSAGE(STATUS " With dc1394 = YES")
ELSE()
MESSAGE(STATUS " With dc1394 = NO (dc1394 not found)")
ENDIF()
IF(G2O_FOUND)
MESSAGE(STATUS " With g2o = YES")
ELSE()
+33
View File
@@ -0,0 +1,33 @@
# - Find DC1394 alias libdc1394
# This module finds an installed DC1394 package.
#
# It sets the following variables:
# DC1394_FOUND - Set to false, or undefined, if DC1394 isn't found.
# DC1394_INCLUDE_DIRS - The DC1394 include directory.
# DC1394_LIBRARIES - The DC1394 library to link against.
find_path(DC1394_INCLUDE_DIRS NAMES dc1394.h PATH_SUFFIXES dc1394)
find_library(DC1394_LIBRARIES NAMES dc1394)
IF (DC1394_INCLUDE_DIRS AND DC1394_LIBRARIES)
SET(DC1394_FOUND TRUE)
#On Mac OS X
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
set(DC1394_LIBRARIES ${DC1394_LIBRARIES} "-framework CoreServices")
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF (DC1394_INCLUDE_DIRS AND DC1394_LIBRARIES)
IF (DC1394_FOUND)
# show which DC1394 was found only if not quiet
IF (NOT DC1394_FIND_QUIETLY)
MESSAGE(STATUS "Found DC1394: ${DC1394_LIBRARIES}")
ENDIF (NOT DC1394_FIND_QUIETLY)
ELSE (DC1394_FOUND)
# fatal error if DC1394 is required but not found
IF (DC1394_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find DC1394 (libdc1394)")
ENDIF (DC1394_FIND_REQUIRED)
ENDIF (DC1394_FOUND)
+12
View File
@@ -83,6 +83,18 @@ IF(OpenNI2_FOUND)
)
ENDIF(OpenNI2_FOUND)
IF(DC1394_FOUND)
ADD_DEFINITIONS("-DWITH_DC1394")
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${DC1394_INCLUDE_DIRS}
)
SET(LIBRARIES
${LIBRARIES}
${DC1394_LIBRARIES}
)
ENDIF(DC1394_FOUND)
IF(G2O_FOUND)
ADD_DEFINITIONS("-DWITH_G2O")
SET(INCLUDE_DIRS