# - Try to find TinyXML # This module finds TinyXML if it is installed and determines where # the library and header files are. This code sets the following variables: # # TINYXML_FOUND - System has TinyXML # TINYXML_INCLUDE_DIRS - The TinyXML include directories # TINYXML_LIBRARIES - The libraries needed to use TinyXML # TINYXML_DEFINITIONS - Compiler switches required for using TinyXML # # Based on http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules find_package(PkgConfig) pkg_check_modules(PC_TINYXML tinyxml) find_path(TINYXML_INCLUDE_DIR tinyxml.h HINTS ${PC_TINYXML_INCLUDEDIR} PATH_SUFFIXES include PATHS /usr /usr/local) find_library(TINYXML_LIBRARY tinyxml HINTS ${PC_TINYXML_LIBDIR} PATH_SUFFIXES lib64 lib PATHS /usr /usr/local) set(TINYXML_LIBRARIES ${TINYXML_LIBRARY}) set(TINYXML_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(TinyXML DEFAULT_MSG TINYXML_LIBRARY TINYXML_INCLUDE_DIR) mark_as_advanced(TINYXML_INCLUDE_DIR TINYXML_LIBRARY)