aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/QMenuModel
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2013-01-31 12:28:46 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2013-01-31 12:28:46 -0300
commite5b89efdcb47333503db2bd1dd81f107dc22c067 (patch)
tree562a53bd15fafafbeae2e27b7390066414eafa42 /libqmenumodel/QMenuModel
parent101c523f635c71d4ffaac79bee6b6dc574c73e68 (diff)
downloadqmenumodel-e5b89efdcb47333503db2bd1dd81f107dc22c067.tar.gz
qmenumodel-e5b89efdcb47333503db2bd1dd81f107dc22c067.tar.bz2
qmenumodel-e5b89efdcb47333503db2bd1dd81f107dc22c067.zip
Used qmake to retrieve the import dir used to install QML modules.
Diffstat (limited to 'libqmenumodel/QMenuModel')
-rw-r--r--libqmenumodel/QMenuModel/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/libqmenumodel/QMenuModel/CMakeLists.txt b/libqmenumodel/QMenuModel/CMakeLists.txt
index 047938f..7367e18 100644
--- a/libqmenumodel/QMenuModel/CMakeLists.txt
+++ b/libqmenumodel/QMenuModel/CMakeLists.txt
@@ -24,9 +24,11 @@ qt5_use_modules(qmenumodel-qml Qml Widgets)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
"${CMAKE_CURRENT_BINARY_DIR}/qmldir")
-# Apparently, QT_IMPORTS_DIR didn’t make it to Qt5.
-# In want of a better solution, let’s hardcode it…
-set(QT_IMPORTS_DIR ${_qt5Qml_install_prefix}/${CMAKE_INSTALL_LIBDIR}/qt5/qml)
+execute_process(
+ COMMAND qmake -query QT_INSTALL_QML
+ OUTPUT_VARIABLE QT_IMPORTS_DIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
set(QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/QMenuModel")
install(TARGETS qmenumodel-qml DESTINATION ${QMLPLUGIN_INSTALL_PREFIX})
install(FILES qmldir DESTINATION ${QMLPLUGIN_INSTALL_PREFIX})