Files
ladybird/Meta/CMake/patches/git-patch.cmake
Andrew Kaster 4ba274691e CMake: Add script to FetchContent the swift-collections library
It requires a few patches on top of the latest release to play nice
with our CMake setup.
2024-08-24 19:14:09 -06:00

15 lines
414 B
CMake

# A script to apply a Git patch unless it was already applied
find_package(Git REQUIRED QUIET)
execute_process(
ERROR_VARIABLE discarded RESULT_VARIABLE patch_not_yet_applied
COMMAND ${GIT_EXECUTABLE} apply --reverse --check ${CMAKE_ARGV3})
if(patch_not_yet_applied)
execute_process(
ERROR_VARIABLE discarded
COMMAND ${GIT_EXECUTABLE} apply ${CMAKE_ARGV3} COMMAND_ERROR_IS_FATAL LAST
)
endif()