You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
polkit-qt5-1/0001-Include-moc-generated-...

63 lines
2.1 KiB

From 0f5aa46c8fd67c1b40431c628193082203372ab6 Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Date: Mon, 31 Dec 2012 09:26:33 +0100
Subject: [PATCH 1/5] Include moc generated files.
If we don't include moc generated files, we won't be able to
link the libraries to any program because of unresolved symbols.
---
CMakeLists.txt | 4 ++++
agent/polkitqt1-agent-listener.cpp | 2 +-
agent/polkitqt1-agent-session.cpp | 2 +-
gui/polkitqt1-gui-actionbutton.cpp | 2 --
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cef6a8e..c760031 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,10 @@
project("PolkitQt-1")
cmake_minimum_required(VERSION 2.8.11)
+
+# Instruct CMake to run moc automatically when needed
+set(CMAKE_AUTOMOC ON)
+
find_package(ECM 0.0.6 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
diff --git a/agent/polkitqt1-agent-listener.cpp b/agent/polkitqt1-agent-listener.cpp
index a38b34d..c96d242 100644
--- a/agent/polkitqt1-agent-listener.cpp
+++ b/agent/polkitqt1-agent-listener.cpp
@@ -121,4 +121,4 @@ const PolkitAgentListener *Listener::listener()
}
-
+#include "moc_polkitqt1-agent-listener.cpp"
diff --git a/agent/polkitqt1-agent-session.cpp b/agent/polkitqt1-agent-session.cpp
index 77c6e75..1f875d0 100644
--- a/agent/polkitqt1-agent-session.cpp
+++ b/agent/polkitqt1-agent-session.cpp
@@ -166,4 +166,4 @@ void AsyncResult::setError(const QString &text)
g_simple_async_result_set_error(d->result, POLKIT_ERROR, POLKIT_ERROR_FAILED, "%s", text.toUtf8().data());
}
-
+#include "moc_polkitqt1-agent-session.cpp"
diff --git a/gui/polkitqt1-gui-actionbutton.cpp b/gui/polkitqt1-gui-actionbutton.cpp
index dabc264..e2a9ee5 100644
--- a/gui/polkitqt1-gui-actionbutton.cpp
+++ b/gui/polkitqt1-gui-actionbutton.cpp
@@ -165,5 +165,3 @@ void ActionButtonPrivate::streamClicked(bool c)
//needed because of Q_PRIVATE_SLOT
#include "moc_polkitqt1-gui-actionbutton.cpp"
-
-
--
1.8.5.3