mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 05:57:50 +08:00
75bd2efe0d
* [many ports] 2019.09.14 Updates * Revert failure ports * Revert failure ports * Revert failure ports * [urdfdom] Fix find dependency console_bridge * Revert failure ports * [devil] Compatible with jasper 2.0.20 * [devil] Refix compatible with jasper functions declaration on different os * Update ports/alembic/CONTROL Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * Revert failure ports wangle * [azure-kinect-sensor-sdk] Fix build with matroska 1.6.2 * Revert failure ports * Revert failure ports * [urdfdom-headers] Fix include path in config.cmake file * upload patch * [urdfdom-headers] Refix include path in config.cmake file * [qt5-imageformats] Fix missing include math.h * [urdfdom-headers] Refix include path in config.cmake file * [qt5] Fix adding option PATCHES and other options when using qt_submodule_installation * Remove updated ports version * Commit suggestions * [libideviceactivation] revert Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
65 lines
1.8 KiB
CMake
65 lines
1.8 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO uriparser/uriparser
|
|
REF 25dddb16cf044a7df27884e7ad3911baaaca3d7c # uriparser-0.9.4
|
|
SHA512 9001649eb027d0ff4f990b20d0f05643939e2bb8ab89d158f32353d6f7c4264a551a6af7856ad13890d05f58b3d15d59e6d82ee0d95b7788c03b34bb52086cd2
|
|
HEAD_REF master
|
|
)
|
|
|
|
if("tool" IN_LIST FEATURES)
|
|
set(URIPARSER_BUILD_TOOLS ON)
|
|
else()
|
|
set(URIPARSER_BUILD_TOOLS OFF)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DURIPARSER_BUILD_DOCS=OFF
|
|
-DURIPARSER_BUILD_TESTS=OFF
|
|
OPTIONS_DEBUG
|
|
-DURIPARSER_BUILD_TOOLS=OFF
|
|
OPTIONS_RELEASE
|
|
-DURIPARSER_BUILD_TOOLS=${URIPARSER_BUILD_TOOLS}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
if(URIPARSER_BUILD_TOOLS)
|
|
vcpkg_copy_tools(
|
|
TOOL_NAMES uriparse
|
|
AUTO_CLEAN
|
|
)
|
|
endif()
|
|
|
|
set(_package_version_re "#define[ ]+PACKAGE_VERSION[ ]+\"([0-9]+.[0-9]+.[0-9]+)\"")
|
|
file(STRINGS
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.h"
|
|
_package_version_define REGEX "${_package_version_re}"
|
|
)
|
|
string(REGEX REPLACE "${_package_version_re}" "\\1" _package_version ${_package_version_define})
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}-${_package_version})
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
vcpkg_replace_string(
|
|
${CURRENT_PACKAGES_DIR}/include/uriparser/UriBase.h
|
|
"defined(URI_STATIC_BUILD)"
|
|
"1 // defined(URI_STATIC_BUILD)"
|
|
)
|
|
endif()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/uriparser RENAME copyright)
|
|
|
|
# Remove duplicate info
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
# CMake integration test
|
|
vcpkg_test_cmake(PACKAGE_NAME ${PORT})
|