From ca1a2e39a9ae070e97437a4790c74e948b3f493b Mon Sep 17 00:00:00 2001 From: Karliss Date: Thu, 23 Nov 2023 00:35:27 +0200 Subject: [PATCH] Fix hombrew qt6 python bindings build. --- src/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7b15e4981..801351194 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -533,10 +533,14 @@ if(CUTTER_ENABLE_PYTHON) endforeach() if(APPLE AND _qt5Core_install_prefix) - list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include") - list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtCore") - list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtGui") - list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtWidgets") + if (_qt5Core_install_prefix) + list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include") + list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtCore") + list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtGui") + list(APPEND BINDINGS_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/QtWidgets") + elseif(QT6_INSTALL_PREFIX) + list(APPEND BINDINGS_INCLUDE_DIRS "${QT6_INSTALL_PREFIX}/include") + endif() endif() if (CUTTER_QT6) list(APPEND BINDINGS_INCLUDE_DIRS ${Qt6Core_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS} ${Qt6Gui_INCLUDE_DIRS})