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}")