From 339cd9b84ed4f9f48cc2a0075420caa92a782e5f Mon Sep 17 00:00:00 2001 From: Josip Matak <31473001+jmatak@users.noreply.github.com> Date: Tue, 18 Jan 2022 08:23:17 +0100 Subject: [PATCH] Change Python root directory (#289) --- CMakeLists.txt | 3 ++- src/query/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62fd92cef..7fee1faa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,7 +322,8 @@ if (UBSAN) # To make the program abort on undefined behavior, use UBSAN_OPTIONS=halt_on_error=1. endif() -set(MG_PYTHON_VERSION "" CACHE STRING "Specify the exact python version used by the query modules") +set(MG_PYTHON_VERSION "" CACHE STRING "Specify the exact Python version used by the query modules") +set(MG_PYTHON_PATH "" CACHE STRING "Specify the exact Python path used by the query modules") # Add subprojects include_directories(src) diff --git a/src/query/CMakeLists.txt b/src/query/CMakeLists.txt index ef46e793d..0302df4da 100644 --- a/src/query/CMakeLists.txt +++ b/src/query/CMakeLists.txt @@ -48,6 +48,9 @@ add_dependencies(mg-query generate_lcp_query) target_include_directories(mg-query PUBLIC ${CMAKE_SOURCE_DIR}/include) target_link_libraries(mg-query dl cppitertools Boost::headers) target_link_libraries(mg-query mg-integrations-pulsar mg-integrations-kafka mg-storage-v2 mg-license mg-utils mg-kvstore mg-memory) +if(NOT "${MG_PYTHON_PATH}" STREQUAL "") + set(Python3_ROOT_DIR "${MG_PYTHON_PATH}") +endif() if("${MG_PYTHON_VERSION}" STREQUAL "") find_package(Python3 3.5 REQUIRED COMPONENTS Development) else()