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. --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cba967..0bffb4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ project(qmenumodel) -cmake_minimum_required(VERSION 2.8.0) +cmake_minimum_required(VERSION 2.8.9) -find_package(Qt4 REQUIRED) +find_package(Qt5Core) include(FindPkgConfig) pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32) @@ -39,7 +39,7 @@ endif() OPTION(GENERATE_DOC "Enable qdoc generation" OFF) if(GENERATE_DOC) message(STATUS "QDoc enabled.") - find_program(QDOC_BIN qdoc3) + find_program(QDOC_BIN qdoc) if(NOT QDOC_BIN) message(FATAL_ERROR "qdoc command not found") else() @@ -47,4 +47,3 @@ if(GENERATE_DOC) endif() endif() - -- 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. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 0bffb4e..f51f637 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,12 @@ project(qmenumodel) cmake_minimum_required(VERSION 2.8.9) -find_package(Qt5Core) - +find_package(Qt5Core REQUIRED) include(FindPkgConfig) pkg_check_modules(GLIB REQUIRED glib-2.0>=2.32) pkg_check_modules(GIO REQUIRED gio-2.0>=2.32) +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) add_definitions(-DQT_NO_KEYWORDS) find_program(DBUS_RUNNER dbus-test-runner) -- cgit v1.2.3