1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
# Copyright (c) 2011-2021, The DART development contributors
# All rights reserved.
#
# The list of contributors can be found at:
# https://github.com/dartsim/dart/blob/master/LICENSE
#
# This file is provided under the "BSD-style" License
# Find FCL
#
# This sets the following variables:
# FCL_FOUND
# FCL_INCLUDE_DIRS
# FCL_LIBRARIES
# FCL_VERSION
find_package(PkgConfig QUIET)
# Check to see if pkgconfig is installed.
pkg_check_modules(PC_FCL fcl QUIET)
# Include directories
find_path(FCL_INCLUDE_DIRS
NAMES fcl/collision.h # for FCL < 0.6
NAMES fcl/narrowphase/collision.h
HINTS ${PC_FCL_INCLUDEDIR}
PATHS "${CMAKE_INSTALL_PREFIX}/include")
# Libraries
if(MSVC)
find_package(fcl QUIET CONFIG)
if(TARGET fcl)
set(FCL_LIBRARIES fcl)
endif()
else()
# Give explicit precedence to ${PC_FCL_LIBDIR}
find_library(FCL_LIBRARIES
NAMES fcl
HINTS ${PC_FCL_LIBDIR}
NO_DEFAULT_PATH
NO_CMAKE_PATH
NO_CMAKE_ENVIRONMENT_PATH
NO_SYSTEM_ENVIRONMENT_PATH)
find_library(FCL_LIBRARIES
NAMES fcl
HINTS ${PC_FCL_LIBDIR})
endif()
# Version
if(PC_FCL_VERSION)
set(FCL_VERSION ${PC_FCL_VERSION})
endif()
# Set (NAME)_FOUND if all the variables and the version are satisfied.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(fcl
FAIL_MESSAGE DEFAULT_MSG
REQUIRED_VARS FCL_INCLUDE_DIRS FCL_LIBRARIES
VERSION_VAR FCL_VERSION)
|