From cfcb5960d624bf4dac3dd30ad6b055127c487ff8 Mon Sep 17 00:00:00 2001 From: Hank Leininger Date: Tue, 7 Apr 2015 23:05:53 -0400 Subject: [PATCH] Add DESTDIR support for python modules. Without this patch, DESTDIR is not passed to python setup.py, so build systems that use a staging sandbox prior to installing in real-root, such as Gentoo, cannot build+install it. Note, this probably is not the right way to do this; itunconditionally passes --root=${DESTDIR}, so will probably cause issues when DESTDIR is not set. I am a cmake noob and could not get it to do the right thing conditionally. --- python/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 8710079..e38aef2 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -15,5 +15,5 @@ if (PYTHON) add_custom_target(target ALL DEPENDS ${OUTPUT}) - install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX})") + install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX} --root=${DESTDIR})") endif()