Commit fda7d437 authored by David Edmundson's avatar David Edmundson

Check for python-cairo

Test Plan:
Works correctly when installed

Changed cmake locally to "import asdfasdf"
Got the correct error message and an aborted build

Reviewers: #plasma, ngraham, cgiboudeaux, zzag

Reviewed By: #plasma, ngraham, zzag

Subscribers: ngraham, zzag, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18244
parent 92978bb2
......@@ -10,14 +10,11 @@ include(FeatureSummary)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_SOURCE_DIR}/cmake")
find_package(GTKEngine)
find_package(Sass REQUIRED)
find_package(PythonCairo)
set_package_properties(PythonCairo PROPERTIES TYPE REQUIRED PURPOSE "Required to render assets")
find_package(Breeze)
set_package_properties(Breeze PROPERTIES TYPE REQUIRED PURPOSE "Required to build the Breeze GTK+ styles")
if(CMAKE_VERSION VERSION_LESS 3.12.0)
find_package(PythonInterp 3 REQUIRED)
else()
find_package(Python3 COMPONENTS Interpreter REQUIRED)
endif()
include(KDEInstallDirs)
......
if(CMAKE_VERSION VERSION_LESS 3.12.0)
find_package(PythonInterp 3 REQUIRED)
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
else()
find_package(Python3 COMPONENTS Interpreter REQUIRED)
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
endif()
# Check for python cairo
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import cairo"
RESULT_VARIABLE PYTHON_CAIRO_RESULT)
if (PYTHON_CAIRO_RESULT EQUAL 0)
set(PYTHONCAIRO_FOUND 1)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment