diff options
author | Aleix Pol <aleixpol@kde.org> | 2017-04-10 15:02:12 +0200 |
---|---|---|
committer | Aleix Pol <aleixpol@kde.org> | 2017-04-10 15:09:42 +0200 |
commit | 86f19ab466903bd3bd9123c0a9588403c7cc21a1 (patch) | |
tree | 096ee2ddf2591fc1a256308af804042191d7bffc /modules/test_execute_and_compare.cmake | |
parent | 16aabe1c24b5471d4dc6eb04ed6d0b654e40996d (diff) | |
download | extra-cmake-modules-86f19ab466903bd3bd9123c0a9588403c7cc21a1.tar.gz extra-cmake-modules-86f19ab466903bd3bd9123c0a9588403c7cc21a1.tar.bz2 |
Introduce ecm_generate_qmltypes
Summary:
Introduces a function that allows to generate plugins.qmltypes files for our
qml plugins using qmlplugindump much like Qt does.
Test Plan: Introduced it locally on Purpose and it works
Reviewers: #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D5087
Diffstat (limited to 'modules/test_execute_and_compare.cmake')
-rw-r--r-- | modules/test_execute_and_compare.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/test_execute_and_compare.cmake b/modules/test_execute_and_compare.cmake new file mode 100644 index 00000000..caf72f38 --- /dev/null +++ b/modules/test_execute_and_compare.cmake @@ -0,0 +1,11 @@ +string(REPLACE / ";" processedArgs "${ARG_UNPARSED_ARGUMENTS}") + +execute_process(COMMAND qmlplugindump -nonrelocatable ${processedArgs} ${KDE_INSTALL_QMLDIR} -output ${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes RESULT_VARIABLE code) +if(code) + message(FATAL_ERROR "Could not call qmlplugindump successfully. Exited with code ${code}") +endif() + +execute_process(COMMAND diff -I "//*" ${INPUT} ${CMAKE_CURRENT_SOURCE_DIR}/plugins.qmltypes RESULT_VARIABLE code OUTPUT_VARIABLE out) +if(code) + message(FATAL_ERROR "both plugin dumps differ:\n${out}") +endif() |