From d1de3a29b42a6f65f3bff895dcf9d3869b747d46 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Sun, 19 Jun 2022 12:30:57 +0100 Subject: [PATCH] CMakeLists.txt - Python bindings are not supported in Unity builds fixes #284 (cherry-picked from commit c6ce421432849ee007a89150c6eae2ee63c2b471) --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1be3a930..ee19ff77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -336,8 +336,10 @@ if(KDDockWidgets_PYTHON_BINDINGS) if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR KDDockWidgets_STATIC) message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.") endif() -endif() -if(KDDockWidgets_PYTHON_BINDINGS) + if(CMAKE_UNITY_BUILD) + message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. " + "Try again with CMAKE_UNITY_BUILD=OFF") + endif() add_subdirectory(python) endif()