Python: Simplify CMake code
@@ -25,15 +25,9 @@ elseif (NOT PYTHONLIBS_FOUND)
exclude_binding (python "python3 libs not found")
elseif (PYTHONLIBS_VERSION_STRING MATCHES "^2\\.[0-9]+")
exclude_binding (python "python3 is for python 3 only and not ${PYTHONLIBS_VERSION_STRING}")
-else ()
- if (NOT BUILD_SHARED)
+elseif (NOT BUILD_SHARED)
exclude_binding (python "it can only be built if `BUILD_SHARED` is enabled")
- if (POLICY CMP0078)
- cmake_policy (POP)
- endif (POLICY CMP0078)
- return ()
- endif (NOT BUILD_SHARED)
-
+else ()
add_binding (python)
if (${SWIG_VERSION} MATCHES "^2\\.")
