File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,27 @@ option(FINCEPT_BUILD_TESTS "Build the Fincept Terminal test suite" OFF)
127127# installer. Developers may override for local experimentation with
128128# -DFINCEPT_ALLOW_QT_DRIFT=ON (not for CI or release builds).
129129set (FINCEPT_QT_VERSION 6.8.3)
130+
131+ # Qt 6.8 FindWrapOpenGL.cmake hard-codes "-framework AGL" as a fallback when
132+ # find_library(AGL) fails. Apple removed AGL in macOS 14+ (Sonoma), causing
133+ # linker errors on modern SDKs. Pre-create WrapOpenGL::WrapOpenGL without AGL
134+ # so Qt's FindWrapOpenGL takes its early-return path (target already exists).
135+ if (APPLE AND NOT TARGET WrapOpenGL::WrapOpenGL)
136+ find_package (OpenGL QUIET )
137+ if (OpenGL_FOUND)
138+ add_library (WrapOpenGL::WrapOpenGL INTERFACE IMPORTED )
139+ get_target_property (_fincept_ogl_loc OpenGL::GL IMPORTED_LOCATION )
140+ if (_fincept_ogl_loc AND NOT _fincept_ogl_loc MATCHES "/([^/]+)\\ .framework$" )
141+ get_filename_component (_fincept_ogl_path "${_fincept_ogl_loc} " DIRECTORY )
142+ endif ()
143+ if (NOT _fincept_ogl_path)
144+ set (_fincept_ogl_path "-framework OpenGL" )
145+ endif ()
146+ target_link_libraries (WrapOpenGL::WrapOpenGL INTERFACE "${_fincept_ogl_path} " )
147+ set (WrapOpenGL_FOUND ON )
148+ endif ()
149+ endif ()
150+
130151if (FINCEPT_ALLOW_QT_DRIFT)
131152 find_package (Qt6 REQUIRED COMPONENTS
132153 Widgets Charts PrintSupport Network Sql Concurrent Multimedia )
You can’t perform that action at this time.
0 commit comments