diff options
author | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-10-05 15:13:34 +0200 |
---|---|---|
committer | Olivier Tilloy <olivier.tilloy@canonical.com> | 2012-10-05 15:13:34 +0200 |
commit | 82677d03e4ec89ea4387467bcf7caa954a5ae183 (patch) | |
tree | f47d14eb3b2c4c59fc3e44e8ad56978ecea08e0e /libqmenumodel | |
parent | 8c515504fc8089b5ea3f18825c90cad9b1da2ad8 (diff) | |
download | qmenumodel-82677d03e4ec89ea4387467bcf7caa954a5ae183.tar.gz qmenumodel-82677d03e4ec89ea4387467bcf7caa954a5ae183.tar.bz2 qmenumodel-82677d03e4ec89ea4387467bcf7caa954a5ae183.zip |
Use the automoc feature to simplify a lot the build system.
Diffstat (limited to 'libqmenumodel')
-rw-r--r-- | libqmenumodel/QMenuModel/CMakeLists.txt | 21 | ||||
-rw-r--r-- | libqmenumodel/src/CMakeLists.txt | 27 |
2 files changed, 3 insertions, 45 deletions
diff --git a/libqmenumodel/QMenuModel/CMakeLists.txt b/libqmenumodel/QMenuModel/CMakeLists.txt index fbc448e..8a7702f 100644 --- a/libqmenumodel/QMenuModel/CMakeLists.txt +++ b/libqmenumodel/QMenuModel/CMakeLists.txt @@ -4,40 +4,23 @@ set(QMLPLUGIN_SRC plugin.cpp ) -set(QMLPLUGIN_HEADERS - plugin.h -) - -qt5_wrap_cpp(QMLPLUGIN_MOC - ${QMLPLUGIN_HEADERS} -) - add_library(qmenumodel-qml MODULE ${QMLPLUGIN_SRC} - ${QMLPLUGIN_MOC} ) include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} ${src_SOURCE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} - ${QT_QTDECLARATIVE_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS} - ${GIO_INCLUDE_DIRS} ) -qt5_use_modules(qmenumodel-qml Qml Widgets) - target_link_libraries(qmenumodel-qml qmenumodel - ${QT_QTCORE_LIBRARY} - ${QT_QTDCLARATIVE_LIBRARY} ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ) +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") diff --git a/libqmenumodel/src/CMakeLists.txt b/libqmenumodel/src/CMakeLists.txt index 7e31941..373d11b 100644 --- a/libqmenumodel/src/CMakeLists.txt +++ b/libqmenumodel/src/CMakeLists.txt @@ -2,6 +2,7 @@ project(src) set(QMENUMODEL_SRC converter.cpp + dbus-enums.h qmenumodel.cpp qdbusobject.cpp qdbusmenumodel.cpp @@ -9,41 +10,15 @@ set(QMENUMODEL_SRC qstateaction.cpp ) -set(QMENUMODEL_HEADERS - converter.h - dbus-enums.h - qmenumodel.h - qdbusobject.h - qdbusmenumodel.h - qdbusactiongroup.h - qstateaction.h -) - -qt5_wrap_cpp(QMENUMODEL_MOC - ${QMENUMODEL_HEADERS} -) - add_library(qmenumodel STATIC ${QMENUMODEL_SRC} - ${QMENUMODEL_MOC} ) set_target_properties(qmenumodel PROPERTIES COMPILE_FLAGS -fPIC) include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTGUI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS} - ${GIO_INCLUDE_DIRS} ) qt5_use_modules(qmenumodel Core Widgets) -target_link_libraries(qmenumodel - ${QT_QTCORE_LIBRARY} - ${GLIB_LDFLAGS} - ${GIO_LDFLAGS} -) - |