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 ea0e750e52ee223db34a242f9a7229ac04a0f473 SHA512 1115fdf784eaa18c8287c6d40e773f0a4e8241db6fe8f71a17bb7018c715db0459803e6ebaeac31673c80fbc24505795e7b0783ef04d1e5e8d5359725f3698bf 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)