Made Freenect dependency optional

fixed some toro3d warnings

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1327 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-06-04 20:24:54 +00:00
parent 0d437d22d7
commit bb5e5c0084
10 changed files with 110 additions and 27 deletions

View File

@@ -44,9 +44,26 @@ SET(INCLUDE_DIRS
${OpenCV_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${Freenect_INCLUDE_DIRS}
)
SET(LIBRARIES
${OpenCV_LIBS}
${PCL_LIBRARIES}
${ZLIB_LIBRARIES}
)
IF(Freenect_FOUND)
ADD_DEFINITIONS("-DWITH_FREENECT")
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
${Freenect_INCLUDE_DIRS}
)
SET(LIBRARIES
${LIBRARIES}
${Freenect_LIBRARIES}
)
ENDIF(Freenect_FOUND)
####################################
# Generate resources files
####################################
@@ -83,7 +100,7 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
# Add binary that is built from the source file "main.cpp".
# The extension is automatically found.
ADD_LIBRARY(rtabmap_core ${SRC_FILES} ${RESOURCES_HEADERS})
TARGET_LINK_LIBRARIES(rtabmap_core rtabmap_utilite ${OpenCV_LIBS} ${PCL_LIBRARIES} ${ZLIB_LIBRARIES} ${Freenect_LIBRARIES})
TARGET_LINK_LIBRARIES(rtabmap_core rtabmap_utilite ${LIBRARIES})
INSTALL(TARGETS rtabmap_core
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT runtime