Skip to content

Commit 6346df7

Browse files
committed
pick up default python and python libs rather than specific version
1 parent 00dbc05 commit 6346df7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

example/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ project(gtsam_example CXX C)
77

88
###################################################################################
99
# 2. Set the python version
10-
set(GTSAM_PYTHON_VERSION "3.6")
10+
set(GTSAM_PYTHON_VERSION "Default" CACHE STRING "The Python version to use for wrapping")
11+
if(GTSAM_PYTHON_VERSION STREQUAL "Default")
12+
find_package(PythonInterp REQUIRED)
13+
find_package(PythonLibs REQUIRED)
14+
else()
15+
find_package(PythonInterp ${GTSAM_PYTHON_VERSION} EXACT REQUIRED)
16+
find_package(PythonLibs ${GTSAM_PYTHON_VERSION} EXACT REQUIRED)
17+
endif()
1118

1219
###################################################################################
1320
# 3. Find GTSAM components so we have access to the GTSAM Cython install path

0 commit comments

Comments
 (0)