2016-09-19 11:50:08 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-06-21 06:20:52 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO leethomason/tinyxml2
|
2017-06-29 05:09:00 +08:00
|
|
|
REF 5.0.1
|
|
|
|
SHA512 a51ec5843774df0482620c549fb6c61d30a6db5025be26ff6d25b3c53533a27a57f00b026bd9fbca78e9e30084b3f5f6fbff9dba315d078419da084b57f518ba
|
2017-06-21 06:20:52 +08:00
|
|
|
HEAD_REF master
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
|
2017-06-29 05:09:00 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(BUILD_STATIC_LIBS 1)
|
|
|
|
else()
|
|
|
|
set(BUILD_STATIC_LIBS 0)
|
|
|
|
endif()
|
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
vcpkg_configure_cmake(
|
2016-09-29 08:05:56 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-06-29 05:09:00 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
|
2016-09-19 11:50:08 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2017-06-21 06:20:52 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyxml2")
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2016-09-19 11:50:08 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-06-21 06:20:52 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
# Handle copyright
|
2016-09-29 08:05:56 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2)
|
2016-09-19 11:50:08 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright)
|