python build BUGFIX wrong use --root
if enviroment variable DESTDIR is not set, use default path with begin leading /
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 235562d..c164e0b 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -22,9 +22,5 @@
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)
- 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()
+ install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} build -b ${PYAPI_BUILD_DIR} install --root=\$ENV{DESTDIR}/ --prefix=${CMAKE_INSTALL_PREFIX})")
endif()