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 2661ed4998e8c5e9fa0a7f58b2d32eeab6544a70 SHA512 07e1f66140883ae407646b3354b60457fd64df267e154cd7d10296bbae3a2d5c050202bcff5a2fdc6ecb4c6dab5bd7b35db3e321d4539085a40b52131d4e8e35 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) file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/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)