2025-05-14 12:04:10 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
from misc.utility.scons_hints import *
|
|
|
|
|
|
2025-08-25 15:51:20 -07:00
|
|
|
from SCons.Script import Glob
|
|
|
|
|
|
|
|
|
|
from platform_methods import setup_swift_builder
|
|
|
|
|
|
2025-05-14 12:04:10 +01:00
|
|
|
Import("env")
|
|
|
|
|
|
|
|
|
|
env_apple_embedded = env.Clone()
|
|
|
|
|
|
|
|
|
|
# Enable module support
|
|
|
|
|
env_apple_embedded.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
|
|
|
|
|
|
2025-08-25 15:51:20 -07:00
|
|
|
# Configure Swift builder
|
|
|
|
|
apple_platform = env["APPLE_PLATFORM"]
|
|
|
|
|
sdk_path = env["APPLE_SDK_PATH"]
|
|
|
|
|
current_path = Dir(".").abspath
|
|
|
|
|
bridging_header_filename = "bridging_header_apple_embedded.h"
|
|
|
|
|
swift_files = Glob("*.swift")
|
|
|
|
|
swift_file_names = list(map(lambda f: f.name, swift_files))
|
|
|
|
|
setup_swift_builder(
|
|
|
|
|
env_apple_embedded, apple_platform, sdk_path, current_path, bridging_header_filename, swift_file_names
|
|
|
|
|
)
|
|
|
|
|
|
2025-05-14 12:04:10 +01:00
|
|
|
# Use bundled Vulkan headers
|
|
|
|
|
vulkan_dir = "#thirdparty/vulkan"
|
|
|
|
|
env_apple_embedded.Prepend(CPPPATH=[vulkan_dir, vulkan_dir + "/include"])
|
|
|
|
|
|
|
|
|
|
# Driver source files
|
2025-08-25 15:51:20 -07:00
|
|
|
env_apple_embedded.add_source_files(env_apple_embedded.drivers_sources, "*.mm")
|
|
|
|
|
env_apple_embedded.add_source_files(env_apple_embedded.drivers_sources, "*.swift")
|