aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Leeber <flori@bin.org.in>2018-07-27 21:18:57 +0200
committerGitHub <noreply@github.com>2018-07-27 21:18:57 +0200
commit30e3dc541966abfd2ac1436caec7cd4bebdf996e (patch)
tree10dad52563388ef1b29fc0ccf218655e7f37c801
parentf2367433aef6e289eb527e342e48b21392dde843 (diff)
parent276a0330b190842ece3fa4bd2e32b5c3b60fed58 (diff)
downloadqmenumodel-30e3dc541966abfd2ac1436caec7cd4bebdf996e.tar.gz
qmenumodel-30e3dc541966abfd2ac1436caec7cd4bebdf996e.tar.bz2
qmenumodel-30e3dc541966abfd2ac1436caec7cd4bebdf996e.zip
Merge pull request #2 from vanyasem/master
Fix build with Qt 5.11_beta3 (dropping qt5_use_modules)
-rw-r--r--libqmenumodel/QMenuModel/CMakeLists.txt5
-rw-r--r--libqmenumodel/src/CMakeLists.txt4
2 files changed, 5 insertions, 4 deletions
diff --git a/libqmenumodel/QMenuModel/CMakeLists.txt b/libqmenumodel/QMenuModel/CMakeLists.txt
index eb4d463..7f0f74d 100644
--- a/libqmenumodel/QMenuModel/CMakeLists.txt
+++ b/libqmenumodel/QMenuModel/CMakeLists.txt
@@ -13,14 +13,15 @@ include_directories(
${GLIB_INCLUDE_DIRS}
)
+find_package(Qt5Qml REQUIRED)
+find_package(Qt5Quick REQUIRED)
target_link_libraries(qmenumodel-qml
qmenumodel
${GLIB_LDFLAGS}
${GIO_LDFLAGS}
+ Qt5::Qml Qt5::Quick
)
-qt5_use_modules(qmenumodel-qml Qml Quick)
-
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
"${CMAKE_CURRENT_BINARY_DIR}/qmldir")
diff --git a/libqmenumodel/src/CMakeLists.txt b/libqmenumodel/src/CMakeLists.txt
index e8eb4c0..9a49840 100644
--- a/libqmenumodel/src/CMakeLists.txt
+++ b/libqmenumodel/src/CMakeLists.txt
@@ -45,13 +45,13 @@ include_directories(
${GIO_INCLUDE_DIRS}
)
+find_package(Qt5Quick REQUIRED)
target_link_libraries(${SHAREDLIBNAME}
${GLIB_LDFLAGS}
${GIO_LDFLAGS}
+ Qt5::Core Qt5::Qml Qt5::Quick
)
-qt5_use_modules(${SHAREDLIBNAME} Core Qml Quick)
-
install(TARGETS ${SHAREDLIBNAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(QMENUMODEL_HEADERS