mirror of
https://github.com/westonrobot/scout_ros.git
synced 2026-01-12 11:20:02 +08:00
updated package structure and more fixes
This commit is contained in:
36
scout_base/cmake/FindLCM.cmake
Normal file
36
scout_base/cmake/FindLCM.cmake
Normal file
@@ -0,0 +1,36 @@
|
||||
###############################################################################
|
||||
# Find package: lcm
|
||||
#
|
||||
# This sets the following variables:
|
||||
|
||||
# <package>_FOUND
|
||||
# <package>_INCLUDE_DIRS
|
||||
# <package>_LIBRARIES
|
||||
# Source: https://github.com/RobotLocomotion/director/blob/master/cmake/modules/FindLCM.cmake
|
||||
|
||||
|
||||
macro(pkg_config_find_module varname pkgname header library pathsuffix)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(${varname}_pkgconfig ${pkgname})
|
||||
|
||||
find_path(${varname}_INCLUDE_DIR ${header}
|
||||
HINTS ${${varname}_pkgconfig_INCLUDEDIR}
|
||||
PATH_SUFFIXES ${pathsuffix}
|
||||
DOC "Path to ${pkgname} include directory")
|
||||
|
||||
find_library(${varname}_LIBRARY ${library} HINTS ${${varname}_pkgconfig_LIBDIR} DOC "Path to ${pkgname} library")
|
||||
|
||||
set(${varname}_INCLUDE_DIRS ${${varname}_INCLUDE_DIR})
|
||||
set(${varname}_LIBRARIES ${${varname}_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(${varname} DEFAULT_MSG ${varname}_INCLUDE_DIR ${varname}_LIBRARY)
|
||||
|
||||
mark_as_advanced(${varname}_INCLUDE_DIR)
|
||||
mark_as_advanced(${varname}_LIBRARY)
|
||||
|
||||
endmacro()
|
||||
|
||||
|
||||
pkg_config_find_module(LCM lcm lcm/lcm.h lcm lcm)
|
||||
Reference in New Issue
Block a user