Add slam_in_autonomous_driving repo
This commit is contained in:
27
workspace/slam_in_autonomous_driving/cmake/FindCSparse.cmake
Normal file
27
workspace/slam_in_autonomous_driving/cmake/FindCSparse.cmake
Normal file
@@ -0,0 +1,27 @@
|
||||
# Look for csparse; note the difference in the directory specifications!
|
||||
find_path(CSPARSE_INCLUDE_DIR NAMES cs.h
|
||||
PATHS
|
||||
/usr/include/suitesparse
|
||||
/usr/include
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/usr/include/ufsparse
|
||||
/opt/local/include/ufsparse
|
||||
/usr/local/include/ufsparse
|
||||
/sw/include/ufsparse
|
||||
PATH_SUFFIXES
|
||||
suitesparse
|
||||
)
|
||||
|
||||
find_library(CSPARSE_LIBRARY NAMES cxsparse libcxsparse
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CSPARSE DEFAULT_MSG
|
||||
CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY)
|
||||
94
workspace/slam_in_autonomous_driving/cmake/FindCholmod.cmake
Normal file
94
workspace/slam_in_autonomous_driving/cmake/FindCholmod.cmake
Normal file
@@ -0,0 +1,94 @@
|
||||
# Cholmod lib usually requires linking to a blas and lapack library.
|
||||
# It is up to the user of this module to find a BLAS and link to it.
|
||||
|
||||
if (CHOLMOD_INCLUDE_DIR AND CHOLMOD_LIBRARIES)
|
||||
set(CHOLMOD_FIND_QUIETLY TRUE)
|
||||
endif (CHOLMOD_INCLUDE_DIR AND CHOLMOD_LIBRARIES)
|
||||
|
||||
find_path(CHOLMOD_INCLUDE_DIR
|
||||
NAMES
|
||||
cholmod.h
|
||||
PATHS
|
||||
$ENV{CHOLMODDIR}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
PATH_SUFFIXES
|
||||
suitesparse
|
||||
ufsparse
|
||||
)
|
||||
|
||||
find_library(CHOLMOD_LIBRARY
|
||||
NAMES cholmod libcholmod
|
||||
PATHS $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARY})
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
|
||||
get_filename_component(CHOLMOD_LIBDIR ${CHOLMOD_LIBRARIES} PATH)
|
||||
|
||||
find_library(AMD_LIBRARY
|
||||
NAMES amd libamd
|
||||
PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (AMD_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${AMD_LIBRARY})
|
||||
else ()
|
||||
set(CHOLMOD_LIBRARIES FALSE)
|
||||
endif ()
|
||||
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
|
||||
find_library(COLAMD_LIBRARY NAMES colamd libcolamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (COLAMD_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${COLAMD_LIBRARY})
|
||||
else ()
|
||||
set(CHOLMOD_LIBRARIES FALSE)
|
||||
endif ()
|
||||
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
|
||||
find_library(CAMD_LIBRARY NAMES camd libcamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (CAMD_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CAMD_LIBRARY})
|
||||
else ()
|
||||
set(CHOLMOD_LIBRARIES FALSE)
|
||||
endif ()
|
||||
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
|
||||
find_library(CCOLAMD_LIBRARY NAMES ccolamd libccolamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (CCOLAMD_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CCOLAMD_LIBRARY})
|
||||
else ()
|
||||
set(CHOLMOD_LIBRARIES FALSE)
|
||||
endif ()
|
||||
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
|
||||
find_library(CHOLMOD_METIS_LIBRARY NAMES metis libmetis PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (CHOLMOD_METIS_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CHOLMOD_METIS_LIBRARY})
|
||||
endif ()
|
||||
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
if(CHOLMOD_LIBRARIES)
|
||||
find_library(CHOLMOD_SUITESPARSECONFIG_LIBRARY NAMES suitesparseconfig
|
||||
PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
|
||||
if (CHOLMOD_SUITESPARSECONFIG_LIBRARY)
|
||||
set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CHOLMOD_SUITESPARSECONFIG_LIBRARY})
|
||||
endif ()
|
||||
endif(CHOLMOD_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CHOLMOD DEFAULT_MSG
|
||||
CHOLMOD_INCLUDE_DIR CHOLMOD_LIBRARIES)
|
||||
|
||||
mark_as_advanced(CHOLMOD_LIBRARIES)
|
||||
209
workspace/slam_in_autonomous_driving/cmake/FindGlog.cmake
Normal file
209
workspace/slam_in_autonomous_driving/cmake/FindGlog.cmake
Normal file
@@ -0,0 +1,209 @@
|
||||
# Ceres Solver - A fast non-linear least squares minimizer
|
||||
# Copyright 2015 Google Inc. All rights reserved.
|
||||
# http://ceres-solver.org/
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# * Neither the name of Google Inc. nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Author: alexs.mac@gmail.com (Alex Stewart)
|
||||
#
|
||||
|
||||
# FindGlog.cmake - Find Google glog logging library.
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# GLOG_FOUND: TRUE iff glog is found.
|
||||
# GLOG_INCLUDE_DIRS: Include directories for glog.
|
||||
# GLOG_LIBRARIES: Libraries required to link glog.
|
||||
#
|
||||
# The following variables control the behaviour of this module:
|
||||
#
|
||||
# GLOG_INCLUDE_DIR_HINTS: List of additional directories in which to
|
||||
# search for glog includes, e.g: /timbuktu/include.
|
||||
# GLOG_LIBRARY_DIR_HINTS: List of additional directories in which to
|
||||
# search for glog libraries, e.g: /timbuktu/lib.
|
||||
#
|
||||
# The following variables are also defined by this module, but in line with
|
||||
# CMake recommended FindPackage() module style should NOT be referenced directly
|
||||
# by callers (use the plural variables detailed above instead). These variables
|
||||
# do however affect the behaviour of the module via FIND_[PATH/LIBRARY]() which
|
||||
# are NOT re-called (i.e. search for library is not repeated) if these variables
|
||||
# are set with valid values _in the CMake cache_. This means that if these
|
||||
# variables are set directly in the cache, either by the user in the CMake GUI,
|
||||
# or by the user passing -DVAR=VALUE directives to CMake when called (which
|
||||
# explicitly defines a cache variable), then they will be used verbatim,
|
||||
# bypassing the HINTS variables and other hard-coded search locations.
|
||||
#
|
||||
# GLOG_INCLUDE_DIR: Include directory for glog, not including the
|
||||
# include directory of any dependencies.
|
||||
# GLOG_LIBRARY: glog library, not including the libraries of any
|
||||
# dependencies.
|
||||
|
||||
# Reset CALLERS_CMAKE_FIND_LIBRARY_PREFIXES to its value when
|
||||
# FindGlog was invoked.
|
||||
macro(GLOG_RESET_FIND_LIBRARY_PREFIX)
|
||||
if (MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "${CALLERS_CMAKE_FIND_LIBRARY_PREFIXES}")
|
||||
endif (MSVC)
|
||||
endmacro(GLOG_RESET_FIND_LIBRARY_PREFIX)
|
||||
|
||||
# Called if we failed to find glog or any of it's required dependencies,
|
||||
# unsets all public (designed to be used externally) variables and reports
|
||||
# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.
|
||||
macro(GLOG_REPORT_NOT_FOUND REASON_MSG)
|
||||
unset(GLOG_FOUND)
|
||||
unset(GLOG_INCLUDE_DIRS)
|
||||
unset(GLOG_LIBRARIES)
|
||||
# Make results of search visible in the CMake GUI if glog has not
|
||||
# been found so that user does not have to toggle to advanced view.
|
||||
mark_as_advanced(CLEAR GLOG_INCLUDE_DIR
|
||||
GLOG_LIBRARY)
|
||||
|
||||
glog_reset_find_library_prefix()
|
||||
|
||||
# Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by FindPackage()
|
||||
# use the camelcase library name, not uppercase.
|
||||
if (Glog_FIND_QUIETLY)
|
||||
message(STATUS "Failed to find glog - " ${REASON_MSG} ${ARGN})
|
||||
elseif (Glog_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Failed to find glog - " ${REASON_MSG} ${ARGN})
|
||||
else ()
|
||||
# Neither QUIETLY nor REQUIRED, use no priority which emits a message
|
||||
# but continues configuration and allows generation.
|
||||
message("-- Failed to find glog - " ${REASON_MSG} ${ARGN})
|
||||
endif ()
|
||||
endmacro(GLOG_REPORT_NOT_FOUND)
|
||||
|
||||
# Handle possible presence of lib prefix for libraries on MSVC, see
|
||||
# also GLOG_RESET_FIND_LIBRARY_PREFIX().
|
||||
if (MSVC)
|
||||
# Preserve the caller's original values for CMAKE_FIND_LIBRARY_PREFIXES
|
||||
# s/t we can set it back before returning.
|
||||
set(CALLERS_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
|
||||
# The empty string in this list is important, it represents the case when
|
||||
# the libraries have no prefix (shared libraries / DLLs).
|
||||
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "" "${CMAKE_FIND_LIBRARY_PREFIXES}")
|
||||
endif (MSVC)
|
||||
|
||||
# Search user-installed locations first, so that we prefer user installs
|
||||
# to system installs where both exist.
|
||||
list(APPEND GLOG_CHECK_INCLUDE_DIRS
|
||||
/usr/local/include
|
||||
/usr/local/homebrew/include # Mac OS X
|
||||
/opt/local/var/macports/software # Mac OS X.
|
||||
/opt/local/include
|
||||
/usr/include)
|
||||
# Windows (for C:/Program Files prefix).
|
||||
list(APPEND GLOG_CHECK_PATH_SUFFIXES
|
||||
glog/include
|
||||
glog/Include
|
||||
Glog/include
|
||||
Glog/Include)
|
||||
|
||||
list(APPEND GLOG_CHECK_LIBRARY_DIRS
|
||||
/usr/local/lib
|
||||
/usr/local/homebrew/lib # Mac OS X.
|
||||
/opt/local/lib
|
||||
/usr/lib)
|
||||
# Windows (for C:/Program Files prefix).
|
||||
list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES
|
||||
glog/lib
|
||||
glog/Lib
|
||||
Glog/lib
|
||||
Glog/Lib)
|
||||
|
||||
# Search supplied hint directories first if supplied.
|
||||
find_path(GLOG_INCLUDE_DIR
|
||||
NAMES glog/logging.h
|
||||
PATHS ${GLOG_INCLUDE_DIR_HINTS}
|
||||
${GLOG_CHECK_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES ${GLOG_CHECK_PATH_SUFFIXES})
|
||||
if (NOT GLOG_INCLUDE_DIR OR
|
||||
NOT EXISTS ${GLOG_INCLUDE_DIR})
|
||||
glog_report_not_found(
|
||||
"Could not find glog include directory, set GLOG_INCLUDE_DIR "
|
||||
"to directory containing glog/logging.h")
|
||||
endif (NOT GLOG_INCLUDE_DIR OR
|
||||
NOT EXISTS ${GLOG_INCLUDE_DIR})
|
||||
|
||||
find_library(GLOG_LIBRARY NAMES glog
|
||||
PATHS ${GLOG_LIBRARY_DIR_HINTS}
|
||||
${GLOG_CHECK_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES ${GLOG_CHECK_LIBRARY_SUFFIXES})
|
||||
if (NOT GLOG_LIBRARY OR
|
||||
NOT EXISTS ${GLOG_LIBRARY})
|
||||
glog_report_not_found(
|
||||
"Could not find glog library, set GLOG_LIBRARY "
|
||||
"to full path to libglog.")
|
||||
endif (NOT GLOG_LIBRARY OR
|
||||
NOT EXISTS ${GLOG_LIBRARY})
|
||||
|
||||
# Mark internally as found, then verify. GLOG_REPORT_NOT_FOUND() unsets
|
||||
# if called.
|
||||
set(GLOG_FOUND TRUE)
|
||||
|
||||
# Glog does not seem to provide any record of the version in its
|
||||
# source tree, thus cannot extract version.
|
||||
|
||||
# Catch case when caller has set GLOG_INCLUDE_DIR in the cache / GUI and
|
||||
# thus FIND_[PATH/LIBRARY] are not called, but specified locations are
|
||||
# invalid, otherwise we would report the library as found.
|
||||
if (GLOG_INCLUDE_DIR AND
|
||||
NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)
|
||||
glog_report_not_found(
|
||||
"Caller defined GLOG_INCLUDE_DIR:"
|
||||
" ${GLOG_INCLUDE_DIR} does not contain glog/logging.h header.")
|
||||
endif (GLOG_INCLUDE_DIR AND
|
||||
NOT EXISTS ${GLOG_INCLUDE_DIR}/glog/logging.h)
|
||||
# TODO: This regex for glog library is pretty primitive, we use lowercase
|
||||
# for comparison to handle Windows using CamelCase library names, could
|
||||
# this check be better?
|
||||
string(TOLOWER "${GLOG_LIBRARY}" LOWERCASE_GLOG_LIBRARY)
|
||||
if (GLOG_LIBRARY AND
|
||||
NOT "${LOWERCASE_GLOG_LIBRARY}" MATCHES ".*glog[^/]*")
|
||||
glog_report_not_found(
|
||||
"Caller defined GLOG_LIBRARY: "
|
||||
"${GLOG_LIBRARY} does not match glog.")
|
||||
endif (GLOG_LIBRARY AND
|
||||
NOT "${LOWERCASE_GLOG_LIBRARY}" MATCHES ".*glog[^/]*")
|
||||
|
||||
# Set standard CMake FindPackage variables if found.
|
||||
if (GLOG_FOUND)
|
||||
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
|
||||
set(GLOG_LIBRARIES ${GLOG_LIBRARY})
|
||||
endif (GLOG_FOUND)
|
||||
|
||||
glog_reset_find_library_prefix()
|
||||
|
||||
# Handle REQUIRED / QUIET optional arguments.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Glog DEFAULT_MSG
|
||||
GLOG_INCLUDE_DIRS GLOG_LIBRARIES)
|
||||
|
||||
# Only mark internal variables as advanced if we found glog, otherwise
|
||||
# leave them visible in the standard GUI for the user to set manually.
|
||||
if (GLOG_FOUND)
|
||||
mark_as_advanced(FORCE GLOG_INCLUDE_DIR
|
||||
GLOG_LIBRARY)
|
||||
endif (GLOG_FOUND)
|
||||
137
workspace/slam_in_autonomous_driving/cmake/FindPANGO.cmake
Executable file
137
workspace/slam_in_autonomous_driving/cmake/FindPANGO.cmake
Executable file
@@ -0,0 +1,137 @@
|
||||
# - Try to find Pango
|
||||
# Once done, this will define
|
||||
#
|
||||
# PANGO_FOUND - system has Pango
|
||||
# PANGO_INCLUDE_DIRS - the Pango include directories
|
||||
# PANGO_LIBRARIES - link these to use Pango
|
||||
# PANGO_DEFINITIONS - compiler flags
|
||||
# PANGOCAIRO_FOUND - system has Pangocairo
|
||||
# PANGOFT2_FOUND - system has Pangoft2
|
||||
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
|
||||
# pango main library
|
||||
PKG_CHECK_MODULES(PC_PANGO QUIET pango)
|
||||
SET(PANGO_DEFINITIONS ${PC_PANGO_CFLAGS_OTHER})
|
||||
|
||||
SET(PANGO_INCLUDE_HINTS
|
||||
${PC_PANGO_INCLUDEDIR}
|
||||
${PC_PANGO_INCLUDE_DIRS}
|
||||
$ENV{PANGO_HOME}/include
|
||||
$ENV{PANGO_ROOT}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/pango/include
|
||||
)
|
||||
FIND_PATH(PANGO_INCLUDE_DIR
|
||||
NAMES pango/pango.h
|
||||
HINTS ${PANGO_INCLUDE_HINTS}
|
||||
PATH_SUFFIXES pango pango-1.0 pango1.0
|
||||
)
|
||||
|
||||
SET(PANGO_LIBRARY_HINTS
|
||||
${PC_PANGO_LIBDIR}
|
||||
${PC_PANGO_LIBRARY_DIRS}
|
||||
$ENV{PANGO_HOME}/lib
|
||||
$ENV{PANGO_ROOT}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/lib
|
||||
/pango/lib
|
||||
)
|
||||
FIND_LIBRARY(PANGO_LIBRARY
|
||||
NAMES pango PANGO PANGO-1.0 pango-1.0
|
||||
HINTS ${PANGO_LIBRARY_HINTS}
|
||||
PATH_SUFFIXES pango pango-1.0 pango1.0
|
||||
)
|
||||
|
||||
SET(PANGO_INCLUDE_DIRS ${PANGO_INCLUDE_DIR})
|
||||
SET(PANGO_LIBRARIES ${PANGO_LIBRARY})
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pango DEFAULT_MSG PANGO_INCLUDE_DIRS PANGO_LIBRARIES)
|
||||
MARK_AS_ADVANCED(PANGO_INCLUDE_DIR PANGO_LIBRARY)
|
||||
|
||||
IF(PANGO_FOUND)
|
||||
# dependencies
|
||||
FIND_PACKAGE(GLIB2 REQUIRED)
|
||||
IF(GLIB2_FOUND)
|
||||
SET(PANGO_INCLUDE_DIRS ${PANGO_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS})
|
||||
SET(PANGO_LIBRARIES ${PANGO_LIBRARIES} ${GLIB2_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(GObject REQUIRED)
|
||||
IF(GLIB2_FOUND)
|
||||
SET(PANGO_INCLUDE_DIRS ${PANGO_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS})
|
||||
SET(PANGO_LIBRARIES ${PANGO_LIBRARIES} ${GOBJECT_LIBRARIES})
|
||||
ENDIF()
|
||||
|
||||
# pangocairo
|
||||
PKG_CHECK_MODULES(PC_PANGOCAIRO QUIET pangocairo)
|
||||
FIND_PATH(PANGOCAIRO_INCLUDE_DIRS
|
||||
NAMES pango/pangocairo.h
|
||||
HINTS ${PC_PANGOCAIRO_INCLUDEDIR}
|
||||
${PC_PANGOCAIRO_INCLUDE_DIRS}
|
||||
$ENV{PANGOCAIRO_HOME}/include
|
||||
$ENV{PANGOCAIRO_ROOT}/include
|
||||
/pangocairo/include
|
||||
${PANGO_INCLUDE_HINTS}
|
||||
PATH_SUFFIXES pango pango-1.0 pangocairo libpangocairo-1.0 pangocairo1.0
|
||||
)
|
||||
IF(PANGOCAIRO_INCLUDE_DIRS)
|
||||
SET(PANGO_INCLUDE_DIRS ${PANGO_INCLUDE_DIRS} ${PANGOCAIRO_INCLUDE_DIRS})
|
||||
ENDIF()
|
||||
FIND_LIBRARY(PANGOCAIRO_LIBRARIES
|
||||
NAMES pangocairo PANGOcairo PANGOcairo-1.0 pangocairo-1.0 libpangocairo-1.0
|
||||
HINTS ${PC_PANGOCAIRO_LIBDIR}
|
||||
${PC_PANGOCAIRO_LIBRARY_DIRS}
|
||||
$ENV{PANGOCAIRO_HOME}/lib
|
||||
$ENV{PANGOCAIRO_ROOT}/lib
|
||||
${PANGO_LIBRARY_HINTS}
|
||||
PATH_SUFFIXES pango pango-1.0 pangocairo libpangocairo-1.0 pangocairo1.0
|
||||
)
|
||||
IF(PANGOCAIRO_LIBRARIES)
|
||||
SET(PANGO_LIBRARIES ${PANGO_LIBRARIES} ${PANGOCAIRO_LIBRARIES})
|
||||
ENDIF()
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pangocairo DEFAULT_MSG PANGOCAIRO_INCLUDE_DIRS PANGOCAIRO_LIBRARIES)
|
||||
|
||||
# pangoft2
|
||||
PKG_CHECK_MODULES(PC_PANGOFT2 QUIET pangoft2)
|
||||
FIND_PATH(PANGOFT2_INCLUDE_DIRS
|
||||
NAMES pango/pangoft2.h
|
||||
HINTS ${PC_PANGOFT2_INCLUDEDIR}
|
||||
${PC_PANGOFT2_INCLUDE_DIRS}
|
||||
$ENV{PANGOFT2_HOME}/include
|
||||
$ENV{PANGOFT2_ROOT}/include
|
||||
/pangoft2/include
|
||||
${PANGO_INCLUDE_HINTS}
|
||||
PATH_SUFFIXES pango pangoft2 libpangoft2-1.0 pangoft21.0
|
||||
)
|
||||
IF(PANGOFT2_INCLUDE_DIRS)
|
||||
SET(PANGOFT2_INCLUDE_DIRS ${PANGO_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
||||
FIND_PACKAGE(Freetype REQUIRED)
|
||||
IF(FREETYPE_FOUND)
|
||||
SET(PANGOFT2_INCLUDE_DIRS ${PANGOFT2_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS})
|
||||
ENDIF()
|
||||
FIND_PACKAGE(Fontconfig REQUIRED)
|
||||
IF(FONTCONFIG_FOUND)
|
||||
SET(PANGOFT2_INCLUDE_DIRS ${PANGOFT2_INCLUDE_DIRS} ${FONTCONFIG_INCLUDE_DIRS})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
FIND_LIBRARY(PANGOFT2_LIBRARIES
|
||||
NAMES pangoft2 pangoft2-1.0 libpangoft2-1.0
|
||||
HINTS ${PC_PANGOFT2_LIBDIR}
|
||||
${PC_PANGOFT2_LIBRARY_DIRS}
|
||||
$ENV{PANGOFT2_HOME}/lib
|
||||
$ENV{PANGOFT2_ROOT}/lib
|
||||
${PANGO_LIBRARY_HINTS}
|
||||
PATH_SUFFIXES pango pangoft2 libpangoft2-1.0 pangoft21.0
|
||||
)
|
||||
IF(PANGOFT2_LIBRARIES)
|
||||
SET(PANGOFT2_LIBRARIES ${PANGO_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
||||
ENDIF()
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pangoft2 DEFAULT_MSG PANGOFT2_INCLUDE_DIRS PANGOFT2_LIBRARIES)
|
||||
|
||||
MARK_AS_ADVANCED(PANGOCAIRO_INCLUDE_DIRS PANGOCAIRO_LIBRARIES PANGOFT2_INCLUDE_DIRS PANGOFT2_LIBRARIES)
|
||||
|
||||
ENDIF()
|
||||
132
workspace/slam_in_autonomous_driving/cmake/packages.cmake
Normal file
132
workspace/slam_in_autonomous_driving/cmake/packages.cmake
Normal file
@@ -0,0 +1,132 @@
|
||||
# 引入该目录下的.cmake文件
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
# livox ros driver
|
||||
add_subdirectory(thirdparty/livox_ros_driver)
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/devel/include) # 引用ros生成的msg header
|
||||
|
||||
# eigen 3
|
||||
find_package(Eigen3 REQUIRED)
|
||||
include_directories(${EIGEN3_INCLUDE_DIRS})
|
||||
|
||||
# sophus
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/sophus)
|
||||
|
||||
# glog
|
||||
find_package(Glog REQUIRED)
|
||||
include_directories(${Glog_INCLUDE_DIRS})
|
||||
|
||||
# csparse
|
||||
find_package(CSparse REQUIRED)
|
||||
include_directories(${CSPARSE_INCLUDE_DIR})
|
||||
|
||||
# cholmod
|
||||
find_package(Cholmod REQUIRED)
|
||||
include_directories(${CHOLMOD_INCLUDE_DIRS})
|
||||
|
||||
# pcl
|
||||
find_package(PCL REQUIRED)
|
||||
include_directories(${PCL_INCLUDE_DIRS})
|
||||
|
||||
# opencv
|
||||
find_package(OpenCV REQUIRED)
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
# g2o 使用thirdparty中的
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/g2o/)
|
||||
set(g2o_libs
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_stuff.so
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_core.so
|
||||
# ${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_solver_cholmod.so
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_solver_dense.so
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_solver_csparse.so
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_csparse_extension.so
|
||||
${PROJECT_SOURCE_DIR}/thirdparty/g2o/lib/libg2o_types_sba.so
|
||||
${CSPARSE_LIBRARY}
|
||||
${CHOLMOD_LIBRARY}
|
||||
)
|
||||
|
||||
# ros
|
||||
# 为了2D scan, pointcloud2
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
roscpp
|
||||
rospy
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
pcl_ros
|
||||
pcl_conversions
|
||||
)
|
||||
include_directories(${catkin_INCLUDE_DIRS})
|
||||
|
||||
find_package(Pangolin REQUIRED)
|
||||
include_directories(${Pangolin_INCLUDE_DIRS})
|
||||
|
||||
# yaml-cpp
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
include_directories(${yaml-cpp_INCLUDE_DIRS})
|
||||
|
||||
# 其他thirdparty下的内容
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/velodyne/include)
|
||||
|
||||
if(BUILD_WITH_UBUNTU1804)
|
||||
function(extract_file filename extract_dir)
|
||||
message(STATUS "Extract ${filename} to ${extract_dir} ...")
|
||||
set(temp_dir ${extract_dir})
|
||||
if(EXISTS ${temp_dir})
|
||||
file(REMOVE_RECURSE ${temp_dir})
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${temp_dir})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar -xvzf ${filename}
|
||||
WORKING_DIRECTORY ${temp_dir})
|
||||
endfunction()
|
||||
|
||||
set(TBB_ROOT_DIR ${PROJECT_SOURCE_DIR}/thirdparty/tbb/oneTBB-2019_U8/oneTBB-2019_U8)
|
||||
set(TBB_BUILD_DIR "tbb_build_dir=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
|
||||
set(TBB_BUILD_PREFIX "tbb_build_prefix=tbb")
|
||||
|
||||
extract_file(${PROJECT_SOURCE_DIR}/thirdparty/tbb/2019_U8.tar.gz ${PROJECT_SOURCE_DIR}/thirdparty/tbb/oneTBB-2019_U8)
|
||||
|
||||
include(${TBB_ROOT_DIR}/cmake/TBBBuild.cmake)
|
||||
|
||||
#message(STATUS "======TBB_BUILD_DIR = ${TBB_BUILD_DIR}")
|
||||
#message(STATUS "======TBB_BUILD_PREFIX = ${TBB_BUILD_PREFIX}")
|
||||
|
||||
tbb_build(TBB_ROOT ${TBB_ROOT_DIR}
|
||||
compiler=gcc-9
|
||||
stdver=c++17
|
||||
${TBB_BUILD_DIR}
|
||||
${TBB_BUILD_PREFIX}
|
||||
CONFIG_DIR
|
||||
TBB_DIR)
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
|
||||
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/tbb/oneTBB-2019_U8/oneTBB-2019_U8/include)
|
||||
link_directories(${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tbb_release)
|
||||
|
||||
set(third_party_libs
|
||||
${catkin_LIBRARIES}
|
||||
${g2o_libs}
|
||||
${OpenCV_LIBS}
|
||||
${PCL_LIBRARIES}
|
||||
${Pangolin_LIBRARIES}
|
||||
glog gflags
|
||||
${yaml-cpp_LIBRARIES}
|
||||
yaml-cpp
|
||||
TBB::tbb
|
||||
)
|
||||
else()
|
||||
set(third_party_libs
|
||||
${catkin_LIBRARIES}
|
||||
${g2o_libs}
|
||||
${OpenCV_LIBS}
|
||||
${PCL_LIBRARIES}
|
||||
${Pangolin_LIBRARIES}
|
||||
glog gflags
|
||||
${yaml-cpp_LIBRARIES}
|
||||
yaml-cpp
|
||||
tbb
|
||||
)
|
||||
endif ()
|
||||
Reference in New Issue
Block a user