mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 08:19:10 +08:00
9c10548fe9
* [gflags] remove patch, fixed upstream * [gflags] fix gflags-config.cmake wrong path
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
|
endif()
|
|
|
|
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO gflags/gflags
|
|
REF v2.2.1
|
|
SHA512 e919cbdcff1f993ddbfa9c06d8e595566a4717c27ff62f388a64c0e6b4683a93211c24ce78485eae84c2c76053341574064e6c56af185fc2782e2816b26e1fc9
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_apply_patches(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PATCHES
|
|
${CMAKE_CURRENT_LIST_DIR}/0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF
|
|
-DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF
|
|
-DBUILD_gflags_nothreads_LIB:BOOL=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|