File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,18 @@ endif()
171171execute_process (
172172 COMMAND python -c "from distutils import sysconfig; print sysconfig.get_config_var(\" VERSION\" )"
173173 OUTPUT_VARIABLE PYTHON_VERSION
174+ RESULT_VARIABLE PYTHON_VERSION_SUCCESS
174175 OUTPUT_STRIP_TRAILING_WHITESPACE)
176+ if (NOT PYTHON_VERSION_SUCCESS STREQUAL 0)
177+ execute_process (
178+ COMMAND python2 -c "from distutils import sysconfig; print sysconfig.get_config_var(\" VERSION\" )"
179+ OUTPUT_VARIABLE PYTHON_VERSION
180+ RESULT_VARIABLE PYTHON_VERSION_SUCCESS
181+ OUTPUT_STRIP_TRAILING_WHITESPACE)
182+ if (NOT PYTHON_VERSION_SUCCESS STREQUAL 0)
183+ message (FATAL_ERROR "Could not determine Python 2 version, maybe it is not installed?" )
184+ endif ()
185+ endif ()
175186set (python_dist_pkg_dir lib/python${PYTHON_VERSION} /dist-packages)
176187
177188configure_file (hrpsys-base.pc.in ${CMAKE_CURRENT_BINARY_DIR} /hrpsys-base.pc @ONLY)
You can’t perform that action at this time.
0 commit comments