From 857aa51bbd687101382b77c48e4679a5f7599b08 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Sun, 30 Sep 2018 21:29:35 +0200 Subject: [PATCH] Provide foreign python package path is allowed --- python/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 0e67f2f..6045aca 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -88,11 +88,13 @@ message(STATUS "User python site: ${USER_PYTHON_SITE_PACKAGES}") OPTION(INSTALL_PYTHON_LOCAL OFF) -IF (NOT INSTALL_PYTHON_LOCAL) - SET(PYTHON_SITE_PACKAGES ${SYSTEM_PYTHON_SITE_PACKAGES}) -ELSE (NOT INSTALL_PYTHON_LOCAL) - SET(PYTHON_SITE_PACKAGES ${USER_PYTHON_SITE_PACKAGES}) -ENDIF(NOT INSTALL_PYTHON_LOCAL) +IF (NOT PYTHON_SITE_PACKAGES) + IF (NOT INSTALL_PYTHON_LOCAL) + SET(PYTHON_SITE_PACKAGES ${SYSTEM_PYTHON_SITE_PACKAGES}) + ELSE (NOT INSTALL_PYTHON_LOCAL) + SET(PYTHON_SITE_PACKAGES ${USER_PYTHON_SITE_PACKAGES}) + ENDIF(NOT INSTALL_PYTHON_LOCAL) +ENDIF() cmessage(STATUS "Python install location: ${PYTHON_SITE_PACKAGES}")