mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-05 23:52:49 +02:00
build: add path to Metal compiler for Mac
Try to add the path to the Metal compiler on Mac to `CMAKE_PROGRAM_PATH` to help it find the Metal compiler. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
@@ -83,7 +83,16 @@ if(APPLE)
|
||||
include(CheckLanguage)
|
||||
include(MetalShaderSupport)
|
||||
|
||||
execute_process(
|
||||
COMMAND xcode-select -p
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE xcode_path
|
||||
)
|
||||
|
||||
list(APPEND CMAKE_PROGRAM_PATH "${xcode_path}/Toolchains/XcodeDefault.xctoolchain/usr/bin")
|
||||
|
||||
check_language(Metal)
|
||||
|
||||
if(CMAKE_Metal_COMPILER)
|
||||
enable_language(Metal)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user