From 81dbf09d988d87f82496ba106b5f1dd2aad7967d Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Fri, 5 Oct 2012 11:59:50 +0200 Subject: Port to Qt5. To compile and test, one needs to install the qt5-meta-minimal package from the Canonical Qt5 Edgers PPA (https://launchpad.net/~canonical-qt5-edgers/+archive/qt5-beta1). This installs Qt5 in /opt/qt5/. cmake needs to be invoked with CMAKE_PREFIX_PATH=/opt/qt5/lib/cmake, and /opt/qt5/bin needs to be added to $PATH. --- tests/script/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/script') diff --git a/tests/script/CMakeLists.txt b/tests/script/CMakeLists.txt index 11af44e..bf415f5 100644 --- a/tests/script/CMakeLists.txt +++ b/tests/script/CMakeLists.txt @@ -8,7 +8,7 @@ set(DBUSMENUSCRIPT_HEADERS dbusmenuscript.h ) -qt4_wrap_cpp(DBUSMENUSCRIPT_MOC +qt5_wrap_cpp(DBUSMENUSCRIPT_MOC ${DBUSMENUSCRIPT_HEADERS} ) @@ -27,6 +27,8 @@ include_directories( ${QT_QTDBUS_INCLUDE_DIR} ) +qt5_use_modules(dbusmenuscript Core DBus Test) + target_link_libraries(dbusmenuscript ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY} -- cgit v1.2.3 From 82677d03e4ec89ea4387467bcf7caa954a5ae183 Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Fri, 5 Oct 2012 15:13:34 +0200 Subject: Use the automoc feature to simplify a lot the build system. --- tests/script/CMakeLists.txt | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'tests/script') diff --git a/tests/script/CMakeLists.txt b/tests/script/CMakeLists.txt index bf415f5..afa073b 100644 --- a/tests/script/CMakeLists.txt +++ b/tests/script/CMakeLists.txt @@ -1,36 +1,8 @@ project(dbusmenuscript) -set(DBUSMENUSCRIPT_SRC - dbusmenuscript.cpp -) - -set(DBUSMENUSCRIPT_HEADERS - dbusmenuscript.h -) - -qt5_wrap_cpp(DBUSMENUSCRIPT_MOC - ${DBUSMENUSCRIPT_HEADERS} -) - -add_library(dbusmenuscript STATIC - ${DBUSMENUSCRIPT_SRC} - ${DBUSMENUSCRIPT_MOC} -) +add_library(dbusmenuscript STATIC dbusmenuscript.cpp) set_target_properties(dbusmenuscript PROPERTIES COMPILE_FLAGS -fPIC) -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR} - ${QT_INCLUDE_DIR} - ${QT_QTTEST_INCLUDE_DIR} - ${QT_QTCORE_INCLUDE_DIR} - ${QT_QTDBUS_INCLUDE_DIR} -) - qt5_use_modules(dbusmenuscript Core DBus Test) -target_link_libraries(dbusmenuscript - ${QT_QTCORE_LIBRARY} - ${QT_QTTEST_LIBRARY} - ${QT_QTDBUS_LIBRARY} -) -- cgit v1.2.3