vcpkg/ports/gflags/portfile.cmake

38 lines
1.1 KiB
CMake
Raw Normal View History

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
2016-10-02 20:10:35 +08:00
include(vcpkg_common_functions)
2017-05-07 01:53:22 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gflags/gflags
2018-01-10 22:26:56 +08:00
REF v2.2.1
SHA512 e919cbdcff1f993ddbfa9c06d8e595566a4717c27ff62f388a64c0e6b4683a93211c24ce78485eae84c2c76053341574064e6c56af185fc2782e2816b26e1fc9
2017-05-07 01:53:22 +08:00
HEAD_REF master
)
2016-12-01 23:19:31 +08:00
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/revert-fix-install.patch"
)
2016-10-02 20:10:35 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2017-05-07 04:33:59 +08:00
PREFER_NINJA
2016-12-01 23:19:31 +08:00
OPTIONS
-DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF
-DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF
-DBUILD_gflags_nothreads_LIB:BOOL=OFF
2016-10-02 20:10:35 +08:00
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags)
2016-10-02 20:10:35 +08:00
2016-10-28 05:14:42 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-05-07 04:33:59 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
2016-11-02 13:09:29 +08:00
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright)
2016-10-02 20:10:35 +08:00
vcpkg_copy_pdbs()