D18244: Check for python-cairo
Vlad Zagorodniy
noreply at phabricator.kde.org
Mon Jan 14 15:48:22 GMT 2019
zzag added a comment.
Well, something like this works fine, though this is a quick and dirty solution.
if (CMAKE_VERSION VERSION_LESS 3.12.0)
find_package (PythonInterp 3 REQUIRED)
set (_py_exe ${PYTHON_EXECUTABLE})
else ()
find_package (Python 3.0 REQUIRED COMPONENTS Interpreter)
set (_py_exe ${Python_EXECUTABLE})
endif ()
execute_process (COMMAND "${_py_exe}" "-c"
"import re, cairo; print(re.compile('/__init__.py.*').sub('',cairo.__file__))"
RESULT_VARIABLE _PY_cairo_status
OUTPUT_VARIABLE _PY_cairo_location
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (_PY_cairo_status EQUAL 0)
set (PY_CAIRO ${_PY_cairo_location} CACHE STRING "Location of pycairo")
endif ()
find_package_handle_standard_args (PythonCairo DEFAULT_MSG PY_CAIRO)
REPOSITORY
R98 Breeze for Gtk
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D18244
To: davidedmundson, #plasma, ngraham
Cc: ngraham, zzag, plasma-devel, sukalyanbanga, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190114/3f5e0f56/attachment-0001.html>
More information about the Plasma-devel
mailing list