Fix #129985: macOS headless build fails due to missing CGL context symbols
When making a `headless` macOS build, linking would fail complaining about missing `GHOST_ContextCGL` symbols, which are required by the Metal backend. This commit fixes this issue by compiling the macOS CGL GHOST Context if the Metal backend is enabled, instead of only depending on `WITH_HEADLESS`, similarly to what's done on Linux/other *nix systems. Pull Request: https://projects.blender.org/blender/blender/pulls/130847
This commit is contained in:
committed by
Jonas Holzman
parent
5edc68c442
commit
9a8e9bb61b
@@ -185,12 +185,6 @@ elseif(APPLE AND NOT WITH_GHOST_X11)
|
||||
intern/GHOST_WindowViewCocoa.hh
|
||||
)
|
||||
|
||||
list(APPEND SRC
|
||||
intern/GHOST_ContextCGL.mm
|
||||
|
||||
intern/GHOST_ContextCGL.hh
|
||||
)
|
||||
|
||||
if(WITH_INPUT_NDOF)
|
||||
list(APPEND SRC
|
||||
intern/GHOST_NDOFManagerCocoa.mm
|
||||
@@ -531,6 +525,16 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if(WITH_METAL_BACKEND)
|
||||
list(APPEND SRC
|
||||
intern/GHOST_ContextCGL.mm
|
||||
|
||||
intern/GHOST_ContextCGL.hh
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND SRC
|
||||
intern/GHOST_SystemPathsCocoa.hh
|
||||
|
||||
Reference in New Issue
Block a user