diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 3069e98752..550d17e778 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -122,7 +122,7 @@ if (BUILD_TESTING) endif() set(_env_vars) - list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/") + list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/:$ENV{PYTHONPATH}") list(APPEND _env_vars "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}") set_tests_properties(${test} PROPERTIES ENVIRONMENT "${_env_vars}") diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index fe614d8666..6304e97999 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -247,5 +247,5 @@ endif() if (TARGET INTEGRATION_python_system_loader) set_tests_properties(INTEGRATION_python_system_loader PROPERTIES - ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/") + ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/:$ENV{PYTHONPATH}") endif()