diff --git a/CMakeLists.txt b/CMakeLists.txt index 13b1ccd1..ac7879c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,6 +284,10 @@ if(${PROJECT_NAME}_PYTHON_BINDINGS) if(CMAKE_BUILD_TYPE MATCHES "^[Dd]eb" OR ${PROJECT_NAME}_STATIC) message(FATAL_ERROR "** Python Bindings are disabled in debug or static builds.") endif() + if(CMAKE_UNITY_BUILD) + message(FATAL_ERROR "** Python Bindings are disabled in Unity builds. " + "Try again with CMAKE_UNITY_BUILD=OFF") + endif() endif() if(${PROJECT_NAME}_PYTHON_BINDINGS) add_subdirectory(python)