vcpkg/ports/gflags/portfile.cmake

44 lines
1.6 KiB
CMake
Raw Normal View History

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
2017-05-07 01:53:22 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gflags/gflags
2018-11-15 11:59:24 +08:00
REF v2.2.2
SHA512 98c4703aab24e81fe551f7831ab797fb73d0f7dfc516addb34b9ff6d0914e5fd398207889b1ae555bac039537b1d4677067dae403b64903577078d99c1bdb447
2017-05-07 01:53:22 +08:00
HEAD_REF master
PATCHES
2018-12-01 08:01:31 +08:00
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
fix_cmake_config.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
-DGFLAGS_USE_TARGET_NAMESPACE:BOOL=ON
-DCMAKE_DEBUG_POSTFIX=d
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
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
endif()
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 "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
2016-10-02 20:10:35 +08:00
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()