this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Metal an optional part of the build

The new `ENABLE_METAL` option can be set to `ON`/truthy, `OFF`/falsy,
or `AUTO` (the default). When set to `AUTO`, Metal support will only be
enabled if LLVM and Vulkan are available.

Note that even if Metal support is compiled-in, Metal will only be
available at runtime if LLVM and Vulkan are available. This also means
that you can build Darling on a host with LLVM and Vulkan available and
install it on machines without these libraries available with no issue
(the only effect would be that Metal would be unavailable at runtime on
these machines).

+19
+19
CMakeLists.txt
··· 110 110 option(REGENERATE_SDK "Regenerate Header Files For Open Source SDK" OFF) 111 111 option(ADDITIONAL_PACKAGES "Include additional pacakges not included by default in a standard macOS installation" OFF) 112 112 113 + set(ENABLE_METAL AUTO CACHE STRING "Build Darling with Metal support") 114 + set_property(CACHE ENABLE_METAL PROPERTY STRINGS AUTO ON OFF) 115 + 116 + string(TOLOWER "${ENABLE_METAL}" BUILD_METAL) 117 + 118 + if(BUILD_METAL STREQUAL "auto") 119 + # check if Vulkan and LLVM are available 120 + find_program(LLVM_CONFIG_PROGRAM llvm-config) 121 + find_package(Vulkan) 122 + 123 + if(LLVM_CONFIG_PROGRAM AND Vulkan_FOUND) 124 + set(BUILD_METAL ON) 125 + message("Found required libraries; building with Metal support") 126 + else() 127 + set(BUILD_METAL OFF) 128 + message("Did not find required libraries (Vulkan and LLVM); building without Metal support") 129 + endif() 130 + endif() 131 + 113 132 FindDsymutil() 114 133 find_package(Setcap REQUIRED) 115 134