diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 98bbe66650..f7228de0a1 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -105,7 +105,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 da422d2a89..df28287316 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -246,5 +246,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()