CMakeLists.txt - Python bindings are not supported in Unity builds

fixes #284

(cherry-picked from commit c6ce421432)
This commit is contained in:
Sergio Martins
2022-06-19 12:30:57 +01:00
parent 940991c75e
commit d1de3a29b4

View File

@@ -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()