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
|
# 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 ODE
#
# This sets the following variables:
# ODE_FOUND
# ODE_INCLUDE_DIRS
# ODE_LIBRARIES
# ODE_VERSION
#
# and the following targets:
# ODE::ODE
find_package(PkgConfig QUIET)
# Check to see if pkgconfig is installed.
pkg_check_modules(PC_ODE ode QUIET)
# Include directories
find_path(ODE_INCLUDE_DIRS
NAMES ode/collision.h
HINTS ${PC_ODE_INCLUDEDIR}
PATHS "${CMAKE_INSTALL_PREFIX}/include")
# Libraries
if(MSVC)
set(ODE_LIBRARIES "ode$<$<CONFIG:Debug>:d>")
else()
find_library(ODE_LIBRARIES
NAMES ode
HINTS ${PC_ODE_LIBDIR})
endif()
# Version
set(ODE_VERSION ${PC_ODE_VERSION})
# Set (NAME)_FOUND if all the variables and the version are satisfied.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ODE
FAIL_MESSAGE DEFAULT_MSG
REQUIRED_VARS ODE_INCLUDE_DIRS ODE_LIBRARIES
VERSION_VAR ODE_VERSION)
|