2016-10-02 20:10:35 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
find_program(GIT git)
|
|
|
|
|
2017-05-07 01:53:22 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO gflags/gflags
|
|
|
|
REF v2.2.0
|
|
|
|
SHA512 e2106ca70ff539024f888bca12487b3bf7f4f51928acf5ae3e1022f6bbd5e3b7882196ec50b609fd52f739e1f7b13eec7d4b3535d8216ec019a3577de6b4228d
|
|
|
|
HEAD_REF master
|
|
|
|
)
|
2016-12-01 23:19:31 +08:00
|
|
|
|
2017-05-07 01:53:22 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-05-07 04:33:59 +08:00
|
|
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install.patch"
|
2017-05-07 01:53:22 +08:00
|
|
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch"
|
|
|
|
)
|
2016-10-02 20:10:35 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-12-06 14:47:24 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-05-07 04:33:59 +08:00
|
|
|
PREFER_NINJA
|
2016-12-01 23:19:31 +08:00
|
|
|
OPTIONS
|
2016-12-06 14:47:24 +08:00
|
|
|
-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()
|
2017-05-07 04:33:59 +08:00
|
|
|
vcpkg_fixup_cmake_targets()
|
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
|
|
|
|
2016-12-08 06:22:38 +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()
|