-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new ErrorStr API in tinyxml2 6.0.0 (#290)
- Loading branch information
Showing
4 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
# Copyright (c) 2014 Andrew Kelley | ||
# This file is MIT licensed. | ||
# See http://opensource.org/licenses/MIT | ||
# Copyright (c) 2011-2017, 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 TinyXML2 | ||
# | ||
# This sets the following variables: | ||
# TinyXML2_FOUND | ||
# TinyXML2_INCLUDE_DIRS | ||
# TinyXML2_LIBRARIES | ||
# TinyXML2_VERSION | ||
|
||
find_path(TinyXML2_INCLUDE_DIRS NAMES tinyxml2.h) | ||
find_library(TinyXML2_LIBRARIES NAMES tinyxml2) | ||
find_package(PkgConfig QUIET) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(TinyXML2 DEFAULT_MSG TinyXML2_LIBRARIES TinyXML2_INCLUDE_DIRS) | ||
# Check if the pkgconfig file is installed | ||
pkg_check_modules(PC_TINYXML2 tinyxml2 QUIET) | ||
|
||
# Include directories | ||
find_path(TinyXML2_INCLUDE_DIRS | ||
NAMES tinyxml2.h | ||
HINTS ${PC_TinyXML2_INCLUDEDIR} | ||
PATHS "${CMAKE_INSTALL_PREFIX}/include") | ||
|
||
# Libraries | ||
if(MSVC) | ||
set(TinyXML2_LIBRARIES optimized tinyxml2 debug tinyxml2d) | ||
else() | ||
find_library(TinyXML2_LIBRARIES | ||
NAMES tinyxml2 | ||
HINTS ${PC_TinyXML2_LIBDIR}) | ||
endif() | ||
|
||
mark_as_advanced(TinyXML2_INCLUDE_DIRS TinyXML2_LIBRARIES) | ||
# Version | ||
set(TinyXML2_VERSION ${PC_TINYXML2_VERSION}) | ||
|
||
# Set (NAME)_FOUND if all the variables and the version are satisfied. | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(TinyXML2 | ||
FAIL_MESSAGE DEFAULT_MSG | ||
REQUIRED_VARS TinyXML2_INCLUDE_DIRS TinyXML2_LIBRARIES | ||
VERSION_VAR TinyXML2_VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters