diff --git a/cmake/modules/SearchRootCoreDeps.cmake b/cmake/modules/SearchRootCoreDeps.cmake index e032dc132872d6e047c90e7bf6ee636bee998be3..d9c47f736f42c7420cf5a4beaec152ad45a9d518 100644 --- a/cmake/modules/SearchRootCoreDeps.cmake +++ b/cmake/modules/SearchRootCoreDeps.cmake @@ -49,7 +49,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) if(DEFINED Python2_VERSION AND "${Python2_VERSION}" VERSION_LESS "2.7") message(WARNING "Ignoring Python2 installation: unsupported version ${Python2_VERSION} (version>=2.7 required)") endif() - if(Python2_Development_FOUND AND ${Python2_VERSION} VERSION_GREATER_EQUAL "2.7") + if(Python2_Development_FOUND AND "${Python2_VERSION}" VERSION_GREATER_EQUAL "2.7") if(NOT Python3_Development_FOUND) # Only Python2 was found, set as main set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}" CACHE INTERNAL "" FORCE) @@ -75,7 +75,7 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) endif() endif() - if(NOT Python3_Development_FOUND AND (NOT Python2_Development_FOUND OR ${Python2_VERSION} VERSION_LESS "2.7")) + if(NOT Python3_Development_FOUND AND (NOT Python2_Development_FOUND OR "${Python2_VERSION}" VERSION_LESS "2.7")) message(FATAL_ERROR "No supported Python 2 or 3 were found") endif()