vcpkg/ports/tinyxml/tinyxml-config.cmake
markdegreef 6b4b62ad97 [tinyxml] added tinyxml cmake config file (#5544)
Adds ability to use
* find_package(TinyXML REQUIRED)
* TinyXML_LIBRARIES
* tinyxml_INCLUDE_DIRS
2019-03-05 10:39:01 -08:00

20 lines
502 B
CMake

if (tinyxml_CONFIG_INCLUDED)
return()
endif()
set(tinyxml_CONFIG_INCLUDED TRUE)
set(tinyxml_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include")
foreach(lib tinyxml)
set(onelib "${lib}-NOTFOUND")
find_library(onelib ${lib}
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib"
NO_DEFAULT_PATH
)
if(NOT onelib)
message(FATAL_ERROR "Library '${lib}' in package tinyxml is not installed properly")
endif()
list(APPEND tinyxml_LIBRARIES ${onelib})
endforeach()