mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
Lagom: Move Mac SDK header patch stamp file creation into script
No behavior change.
This commit is contained in:
@@ -23,8 +23,7 @@ if (APPLE)
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
add_custom_command(
|
||||
OUTPUT "${CMAKE_BINARY_DIR}/patched_mac_headers/stamp"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${SerenityOS_SOURCE_DIR}/Meta/Lagom/Tools/patch_mac_sdk_headers_for_cxx26.py" -o "${CMAKE_BINARY_DIR}/patched_mac_headers" --sdk-path "${CMAKE_OSX_SYSROOT}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E touch "${CMAKE_BINARY_DIR}/patched_mac_headers/stamp"
|
||||
COMMAND "${Python3_EXECUTABLE}" "${SerenityOS_SOURCE_DIR}/Meta/Lagom/Tools/patch_mac_sdk_headers_for_cxx26.py" -o "${CMAKE_BINARY_DIR}/patched_mac_headers" --sdk-path "${CMAKE_OSX_SYSROOT}" --stamp "${CMAKE_BINARY_DIR}/patched_mac_headers/stamp"
|
||||
VERBATIM
|
||||
DEPENDS "${SerenityOS_SOURCE_DIR}/Meta/Lagom/Tools/patch_mac_sdk_headers_for_cxx26.py"
|
||||
)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
|
||||
@@ -28,6 +29,7 @@ def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--sdk-path', help='Path to Mac SDK', required=True)
|
||||
parser.add_argument('-o', '--output-dir', help='Output path for the patched header files', required=True)
|
||||
parser.add_argument('--stamp', help='File to touch at end')
|
||||
args = parser.parse_args()
|
||||
|
||||
sdk_path = args.sdk_path
|
||||
@@ -49,6 +51,9 @@ def main():
|
||||
with open(output_path, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
if args.stamp:
|
||||
pathlib.Path(args.stamp).touch()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user