diff --git a/CMakeLists.txt b/CMakeLists.txt index 60d707f1e..c6f85acf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,9 +95,6 @@ if (BUILD_SDF) COMPONENTS Interpreter OPTIONAL_COMPONENTS Development ) - if (NOT Python3_Development_FOUND) - GZ_BUILD_WARNING("Python development libraries are missing: Python interfaces are disabled.") - endif() endif() ################################################# @@ -151,8 +148,12 @@ if (BUILD_SDF) add_subdirectory(sdf) add_subdirectory(conf) add_subdirectory(doc) - if (Python3_Development_FOUND AND NOT SKIP_PYBIND11) - add_subdirectory(python) + if (NOT SKIP_PYBIND11) + if (Python3_Development_FOUND) + add_subdirectory(python) + else() + message(WARNING "Python development libraries are missing: Python interfaces are disabled.") + endif() endif() endif(BUILD_SDF)