Included UtiLite library directly in Rtabmap source (to simplify the installation)

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@855 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2013-04-30 20:16:01 +00:00
parent a5df6e74ed
commit b92d0444ac
81 changed files with 4782 additions and 282 deletions
+98
View File
@@ -0,0 +1,98 @@
# - Find the Pthreads library
# This module searches for the Pthreads library (including the
# pthreads-win32 port).
#
# This module defines these variables:
#
# PTHREADS_FOUND
# True if the Pthreads library was found
# PTHREADS_LIBRARY
# The location of the Pthreads library
# PTHREADS_INCLUDE_DIR
# The include path of the Pthreads library
# PTHREADS_DEFINITIONS
# Preprocessor definitions to define
#
# This module responds to the PTHREADS_EXCEPTION_SCHEME
# variable on Win32 to allow the user to control the
# library linked against. The Pthreads-win32 port
# provides the ability to link against a version of the
# library with exception handling. IT IS NOT RECOMMENDED
# THAT YOU USE THIS because most POSIX thread implementations
# do not support stack unwinding.
#
# PTHREADS_EXCEPTION_SCHEME
# C = no exceptions (default)
# (NOTE: This is the default scheme on most POSIX thread
# implementations and what you should probably be using)
# CE = C++ Exception Handling
# SE = Structure Exception Handling (MSVC only)
#
#
# Define a default exception scheme to link against
# and validate user choice.
#
IF(NOT DEFINED PTHREADS_EXCEPTION_SCHEME)
# Assign default if needed
SET(PTHREADS_EXCEPTION_SCHEME "C")
ELSE(NOT DEFINED PTHREADS_EXCEPTION_SCHEME)
# Validate
IF(NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "C" AND
NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "CE" AND
NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "SE")
MESSAGE(FATAL_ERROR "See documentation for FindPthreads.cmake, only C, CE, and SE modes are allowed")
ENDIF(NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "C" AND
NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "CE" AND
NOT PTHREADS_EXCEPTION_SCHEME STREQUAL "SE")
IF(NOT MSVC AND PTHREADS_EXCEPTION_SCHEME STREQUAL "SE")
MESSAGE(FATAL_ERROR "Structured Exception Handling is only allowed for MSVC")
ENDIF(NOT MSVC AND PTHREADS_EXCEPTION_SCHEME STREQUAL "SE")
ENDIF(NOT DEFINED PTHREADS_EXCEPTION_SCHEME)
#
# Find the header file
#
FIND_PATH(PTHREADS_INCLUDE_DIR pthread.h)
#
# Find the library
#
SET(names)
IF(MSVC)
SET(names
pthreadV${PTHREADS_EXCEPTION_SCHEME}2
pthread
)
ELSEIF(MINGW)
SET(names
pthreadG${PTHREADS_EXCEPTION_SCHEME}2
pthread
)
ELSE(MSVC) # Unix / Cygwin / Apple
SET(names pthread)
ENDIF(MSVC)
FIND_LIBRARY(PTHREADS_LIBRARY ${names}
DOC "The Portable Threads Library")
IF(PTHREADS_INCLUDE_DIR AND PTHREADS_LIBRARY)
SET(PTHREADS_FOUND true)
SET(PTHREADS_DEFINITIONS -DHAVE_PTHREAD_H)
SET(PTHREADS_INCLUDE_DIRS ${PTHREADS_INCLUDE_DIR})
SET(PTHREADS_LIBRARIES ${PTHREADS_LIBRARY})
ENDIF(PTHREADS_INCLUDE_DIR AND PTHREADS_LIBRARY)
IF(PTHREADS_FOUND)
IF(NOT PTHREADS_FIND_QUIETLY)
MESSAGE(STATUS "Found Pthreads")
ENDIF(NOT PTHREADS_FIND_QUIETLY)
ELSE(PTHREADS_FOUND)
IF(PTHREADS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find the Pthreads library")
ENDIF(PTHREADS_FIND_REQUIRED)
ENDIF(PTHREADS_FOUND)
-130
View File
@@ -1,130 +0,0 @@
# - Find UtiLite
# This module finds an installed UtiLite package.
#
# It sets the following variables:
# UtiLite_FOUND - Set to false, or undefined, if UtiLite isn't found.
# UtiLite_INCLUDE_DIRS - The UtiLite include directory.
# UtiLite_LIBRARIES - The UtiLite library to link against.
# URESOURCEGENERATOR_EXEC - The resource generator tool executable
#
# Backward compatibility:
# UTILITE_FOUND - Set to false, or undefined, if UtiLite isn't found.
# UTILITE_INCLUDE_DIRS - The UtiLite include directory.
# UTILITE_LIBRARIES - The UtiLite library to link against.
# UTILITE_INCLUDE_DIR - The UtiLite include directory.
# UTILITE_LIBRARY - The UtiLite library to link against.
#
#
SET(UtiLite_VERSION_REQUIRED 0.3.0)
SET(UtiLite_ROOT)
# Add ROS UtiLite directory if ROS is installed
FIND_PROGRAM(ROSPACK_EXEC NAME rospack PATHS)
IF(ROSPACK_EXEC)
EXECUTE_PROCESS(COMMAND ${ROSPACK_EXEC} find utilite
OUTPUT_VARIABLE UtiLite_ROS_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "./"
)
IF(UtiLite_ROS_PATH)
MESSAGE(STATUS "Found UtiLite ROS pkg : ${UtiLite_ROS_PATH}")
SET(UtiLite_ROOT
${UtiLite_ROS_PATH}/utilite
${UtiLite_ROOT}
)
ENDIF(UtiLite_ROS_PATH)
ENDIF(ROSPACK_EXEC)
FIND_PROGRAM(URESOURCEGENERATOR_EXEC NAME uresourcegenerator PATHS ${UtiLite_ROOT}/bin)
IF(URESOURCEGENERATOR_EXEC)
EXECUTE_PROCESS(COMMAND ${URESOURCEGENERATOR_EXEC} -v
OUTPUT_VARIABLE UtiLite_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "./"
)
IF(UtiLite_VERSION VERSION_LESS UtiLite_VERSION_REQUIRED)
IF(UtiLite_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Your version of UtiLite is too old (${UtiLite_VERSION}), UtiLite ${UtiLite_VERSION_REQUIRED} is required.")
ENDIF(UtiLite_FIND_REQUIRED)
ENDIF(UtiLite_VERSION VERSION_LESS UtiLite_VERSION_REQUIRED)
IF(WIN32)
FIND_PATH(UtiLite_INCLUDE_DIRS
utilite/UEventsManager.h
PATH_SUFFIXES "../include")
FIND_LIBRARY(UtiLite_LIBRARIES
NAMES utilite
PATH_SUFFIXES "../lib")
FIND_LIBRARY(UtiLite_Qt
NAMES utilite_qt
PATH_SUFFIXES "../lib")
FIND_LIBRARY(UtiLite_Audio
NAMES utilite_audio
PATH_SUFFIXES "../lib")
FIND_LIBRARY(UtiLite_Cv
NAMES utilite_cv
PATH_SUFFIXES "../lib")
FIND_LIBRARY(UtiLite_Cvqt
NAMES utilite_cvqt
PATH_SUFFIXES "../lib")
ELSE()
FIND_PATH(UtiLite_INCLUDE_DIRS
utilite/UEventsManager.h
PATHS ${UtiLite_ROOT}/include)
FIND_LIBRARY(UtiLite_LIBRARIES
NAMES utilite
PATHS ${UtiLite_ROOT}/lib)
FIND_LIBRARY(UtiLite_Qt
NAMES utilite_qt
PATHS ${UtiLite_ROOT}/lib)
FIND_LIBRARY(UtiLite_Audio
NAMES utilite_audio
PATHS ${UtiLite_ROOT}/lib)
FIND_LIBRARY(UtiLite_Cv
NAMES utilite_cv
PATHS ${UtiLite_ROOT}/lib)
FIND_LIBRARY(UtiLite_Cvqt
NAMES utilite_cvqt
PATHS ${UtiLite_ROOT}/lib)
ENDIF()
IF(UtiLite_LIBRARIES AND UtiLite_Qt)
SET(UtiLite_LIBRARIES ${UtiLite_LIBRARIES} ${UtiLite_Qt})
ENDIF(UtiLite_LIBRARIES AND UtiLite_Qt)
IF(UtiLite_LIBRARIES AND UtiLite_Audio)
SET(UtiLite_LIBRARIES ${UtiLite_LIBRARIES} ${UtiLite_Audio})
ENDIF(UtiLite_LIBRARIES AND UtiLite_Audio)
IF(UtiLite_LIBRARIES AND UtiLite_Cv)
SET(UtiLite_LIBRARIES ${UtiLite_LIBRARIES} ${UtiLite_Cv})
ENDIF(UtiLite_LIBRARIES AND UtiLite_Cv)
IF(UtiLite_LIBRARIES AND UtiLite_Cvqt)
SET(UtiLite_LIBRARIES ${UtiLite_LIBRARIES} ${UtiLite_Cvqt})
ENDIF(UtiLite_LIBRARIES AND UtiLite_Cvqt)
IF (UtiLite_INCLUDE_DIRS AND UtiLite_LIBRARIES)
SET(UtiLite_FOUND TRUE)
ENDIF (UtiLite_INCLUDE_DIRS AND UtiLite_LIBRARIES)
ENDIF(URESOURCEGENERATOR_EXEC)
IF (UtiLite_FOUND)
# show which UtiLite was found only if not quiet
IF (NOT UtiLite_FIND_QUIETLY)
MESSAGE(STATUS "Found UtiLite ${UtiLite_VERSION}")
ENDIF (NOT UtiLite_FIND_QUIETLY)
# backward compatibility...
SET(UTILITE_FOUND ${UtiLite_FOUND})
SET(UTILITE_INCLUDE_DIRS ${UtiLite_INCLUDE_DIRS})
SET(UTILITE_LIBRARIES ${UtiLite_LIBRARIES})
SET(UTILITE_INCLUDE_DIR ${UtiLite_INCLUDE_DIRS})
SET(UTILITE_LIBRARY ${UtiLite_LIBRARIES})
ELSE ()
# fatal error if UtiLite is required but not found
IF (UtiLite_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find UtiLite. Verify your PATH if it is already installed or download it at http://utilite.googlecode.com")
ENDIF (UtiLite_FIND_REQUIRED)
ENDIF ()