mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 07:08:59 +08:00
37 lines
1.2 KiB
CMake
37 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
message(FATAL_ERROR "Abseil currently only supports being built for desktop")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO abseil/abseil-cpp
|
|
REF 070f6e47b33a2909d039e620c873204f78809492
|
|
SHA512 84bc7b17519d3cae471f0e2602ed32111e99d20abfdff26f1e36fd712ff9013b9768b3d37b9179dc40cb1b4a350da1b6955a881c5300ea9b608f97a3101c2762
|
|
HEAD_REF master
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil)
|
|
|
|
file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/*)
|
|
foreach(FILE ${HEADERS})
|
|
file(READ "${FILE}" _contents)
|
|
string(REPLACE "std::min(" "(std::min)(" _contents "${_contents}")
|
|
string(REPLACE "std::max(" "(std::max)(" _contents "${_contents}")
|
|
file(WRITE "${FILE}" "${_contents}")
|
|
endforeach()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/abseil RENAME copyright)
|