2014-06-08 20:11:23 +00:00
|
|
|
# - Try to find TinyXML2
|
|
|
|
# Once done this will define
|
|
|
|
# TINYXML2_FOUND - System has TinyXML2
|
|
|
|
# TINYXML2_INCLUDE_DIRS - The TinyXML2 include directories
|
|
|
|
# TINYXML2_LIBRARIES - The libraries needed to use TinyXML2
|
|
|
|
# TINYXML2_DEFINITIONS - Compiler switches required for using TinyXML2
|
|
|
|
|
|
|
|
find_package(PkgConfig)
|
|
|
|
pkg_check_modules(PC_TINYXML2 QUIET tinyxml2)
|
2015-09-18 04:55:42 +00:00
|
|
|
set(TINYXML2_INCLUDE_DIRS ${PC_TINYXML2_INCLUDE_DIRS})
|
2014-06-08 20:11:23 +00:00
|
|
|
set(TINYXML2_DEFINITIONS ${PC_TINYXML2_CFLAGS_OTHER})
|
|
|
|
|
|
|
|
find_library(TINYXML2_LIBRARY NAMES tinyxml2
|
|
|
|
HINTS ${PC_TINYXML2_LIBDIR} ${PC_TINYXML2_LIBRARY_DIRS})
|
|
|
|
set(TINYXML2_LIBRARIES ${TINYXML2_LIBRARY})
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2015-09-18 04:55:42 +00:00
|
|
|
find_package_handle_standard_args(TinyXML2 DEFAULT_MSG TINYXML2_LIBRARY TINYXML2_INCLUDE_DIRS)
|
2014-06-08 20:11:23 +00:00
|
|
|
|
2015-09-18 04:55:42 +00:00
|
|
|
mark_as_advanced(TINYXML2_INCLUDE_DIRS TINYXML2_LIBRARY)
|