File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ if(EXISTS "${Python_INCLUDE_DIR}")
109109elseif (EXISTS "${Python_INCLUDE_DIRS} " )
110110 set (PYTHON_INCLUDE_DIR "${Python_INCLUDE_DIRS} " CACHE INTERNAL "" FORCE)
111111endif ()
112+ string (REGEX MATCH "[0-9]+\. [0-9]+" PythonMAJMIN "${Python_VERSION} " )
112113
113114# Set the minimum pybind11 version to 2.3 (before that the pybind11::embed target did not exist)
114115find_package (pybind11 2.3 CONFIG QUIET REQUIRED)
@@ -145,6 +146,8 @@ message(STATUS "Python:
145146 Libraries: ${Python_LIBRARIES}
146147 User site: ${PYTHON_USER_SITE} "
147148)
149+
150+
148151message (STATUS "pybind11:
149152 Version: ${pybind11_VERSION}
150153 Config: ${pybind11_CONFIG} "
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ include(SofaPython3Tools)
1010
1111# Find Python3
1212if (NOT Python_FOUND)
13- find_package (Python @Python_VERSION@ QUIET REQUIRED COMPONENTS Interpreter Development)
13+ find_package (Python @PythonMAJMIN@ EXACT QUIET REQUIRED COMPONENTS Interpreter Development)
1414endif ()
1515
1616# Find pybind11
You can’t perform that action at this time.
0 commit comments