mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[tinyxml] added tinyxml cmake config file (#5544)
Adds ability to use * find_package(TinyXML REQUIRED) * TinyXML_LIBRARIES * tinyxml_INCLUDE_DIRS
This commit is contained in:
parent
40a8969d6d
commit
6b4b62ad97
@ -28,3 +28,4 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright)
|
||||
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/tinyxml-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml)
|
||||
|
19
ports/tinyxml/tinyxml-config.cmake
Normal file
19
ports/tinyxml/tinyxml-config.cmake
Normal file
@ -0,0 +1,19 @@
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user