python build BUGFIX do not use --root when installing without DESTDIR set

the --root option removes leading / from prefix even if its value is
empty (no DESTDIR set) and the python module is then installed locally.
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index d2bdd33..235562d 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -22,5 +22,9 @@
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile.in ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile)
 	add_custom_target(pyapi ALL COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} ${DEBUG})
 	add_custom_target(pyapidoc COMMAND make -f ${CMAKE_CURRENT_SOURCE_DIR}/docs/Makefile html)
-    install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --root=\$ENV{DESTDIR} --prefix=${CMAKE_INSTALL_PREFIX})")
+    if(\$ENV{DESTDIR})
+        install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --root=\$ENV{DESTDIR} --prefix=${CMAKE_INSTALL_PREFIX})")
+    else()
+        install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --prefix=${CMAKE_INSTALL_PREFIX})")
+    endif()
 endif()