Skip to content

Commit f99c3f1

Browse files
committed
CMakeLists.txt: make 2 variables configurable
Variables PREFERRED_PYTHON_PATH and PYTHON3_PATH are set with ${PYTHON_EXECUTABLE}. For cross compile, ${PYTHON_EXECUTABLE} may point to other path rather than standard dir such as /usr/bin. Then the generated library file contains such path which should NOT. Update to make variables PREFERRED_PYTHON_PATH and PYTHON3_PATH configurable to avoid such issue. Signed-off-by: Kai Kang <[email protected]>
1 parent a81c66d commit f99c3f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ endif()
125125
find_package(PythonInterp 3)
126126
find_package(PythonLibs 3)
127127

128-
set(PREFERRED_PYTHON_PATH "${PYTHON_EXECUTABLE}")
129-
set(PYTHON3_PATH "${PYTHON_EXECUTABLE}")
128+
set(PREFERRED_PYTHON_PATH "${PYTHON_EXECUTABLE}" CACHE PATH "Path to preferred Python")
129+
set(PYTHON3_PATH "${PYTHON_EXECUTABLE}" CACHE PATH "Path to Python3")
130130

131131
find_package(RPM)
132132
if(RPM_FOUND)

0 commit comments

Comments
 (0)