aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt31
-rw-r--r--src/Makefile.am53
-rw-r--r--src/indicator-printers-service.c3
-rw-r--r--src/indicator-printers.c4
4 files changed, 35 insertions, 56 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..98af322
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,31 @@
+# libayatana-printersmenu.so
+add_library (ayatana-printersmenu SHARED
+ indicator-printers.c
+ indicator-printers.h
+ indicator-menu-item.c
+ indicator-menu-item.h
+ dbus-names.h)
+target_include_directories (ayatana-printersmenu PUBLIC ${SERVICE_INCLUDE_DIRS})
+target_compile_definitions (ayatana-printersmenu PUBLIC GETTEXT_PACKAGE="${GETTEXT_PACKAGE}" PACKAGE_NAME="${PACKAGE}")
+install (TARGETS ayatana-printersmenu DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/ayatana-indicators3/7/")
+
+# cups-notifier.h
+# cups-notifier.c
+include (GdbusCodegen)
+add_gdbus_codegen_with_namespace (CUPS_NOTIFIER cups-notifier org.cups.cupsd Cups "${CMAKE_CURRENT_SOURCE_DIR}/org.cups.cupsd.Notifier.xml")
+
+# ayatana-indicator-printers-service
+add_executable (ayatana-indicator-printers-service
+ indicator-printers-service.c
+ indicator-printers-menu.c
+ indicator-printers-menu.h
+ indicator-printer-state-notifier.c
+ indicator-printer-state-notifier.h
+ spawn-printer-settings.c
+ spawn-printer-settings.h
+ dbus-names.h
+ ${CUPS_NOTIFIER})
+target_include_directories (ayatana-indicator-printers-service PUBLIC ${SERVICE_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
+target_link_libraries (ayatana-indicator-printers-service ${SERVICE_LIBRARIES})
+target_compile_definitions (ayatana-indicator-printers-service PUBLIC GETTEXT_PACKAGE="${GETTEXT_PACKAGE}" LOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
+install (TARGETS ayatana-indicator-printers-service RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR}/${CMAKE_PROJECT_NAME})
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 48e81f0..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,53 +0,0 @@
-printersmenulibdir = $(INDICATORDIR)
-printersmenulib_LTLIBRARIES = libayatana-printersmenu.la
-libayatana_printersmenu_la_SOURCES = \
- indicator-printers.c \
- indicator-printers.h \
- indicator-menu-item.c \
- indicator-menu-item.h \
- dbus-names.h
-
-libayatana_printersmenu_la_CPPFLAGS = $(APPLET_CFLAGS)
-libayatana_printersmenu_la_CFLAGS = $(COVERAGE_CFLAGS)
-libayatana_printersmenu_la_LIBADD = $(APPLET_LIBS) -lm
-libayatana_printersmenu_la_LDFLAGS = \
- $(COVERAGE_LDFLAGS) \
- -module -avoid-version
-
-
-cups_notifier_sources = \
- cups-notifier.c \
- cups-notifier.h
-
-$(cups_notifier_sources): org.cups.cupsd.Notifier.xml
- gdbus-codegen \
- --interface-prefix org.cups.cupsd \
- --c-namespace Cups \
- --generate-c-code cups-notifier \
- $^
-
-
-pkglibexec_PROGRAMS = ayatana-indicator-printers-service
-ayatana_indicator_printers_service_SOURCES = \
- indicator-printers-service.c \
- indicator-printers-menu.c \
- indicator-printers-menu.h \
- indicator-printer-state-notifier.c \
- indicator-printer-state-notifier.h \
- spawn-printer-settings.c \
- spawn-printer-settings.h \
- dbus-names.h
-
-nodist_ayatana_indicator_printers_service_SOURCES = $(cups_notifier_sources)
-
-ayatana_indicator_printers_service_CPPFLAGS = $(SERVICE_CFLAGS)
-ayatana_indicator_printers_service_CFLAGS = $(COVERAGE_CFLAGS)
-ayatana_indicator_printers_service_LDADD = $(SERVICE_LIBS)
-ayatana_indicator_printers_service_LDFLAGS = $(COVERAGE_LDFLAGS)
-
-BUILT_SOURCES = $(cups_notifier_sources)
-CLEANFILES= $(BUILT_SOURCES)
-EXTRA_DIST = org.cups.cupsd.Notifier.xml
-
-DISTCLEANFILES = \
- Makefile.in \ No newline at end of file
diff --git a/src/indicator-printers-service.c b/src/indicator-printers-service.c
index 8d31360..e2a32f7 100644
--- a/src/indicator-printers-service.c
+++ b/src/indicator-printers-service.c
@@ -1,7 +1,9 @@
/*
* Copyright 2012 Canonical Ltd.
+ * Copyright 2022 Robert Tari
*
* Authors: Lars Uebernickel <lars.uebernickel@canonical.com>
+ * Robert Tari <robert@tari.in>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -21,7 +23,6 @@
#include <gtk/gtk.h>
#include <cups/cups.h>
#include "dbus-names.h"
-#include "config.h"
#include <glib/gi18n-lib.h>
#include "cups-notifier.h"
#include "indicator-printers-menu.h"
diff --git a/src/indicator-printers.c b/src/indicator-printers.c
index ba263c9..2b7bb36 100644
--- a/src/indicator-printers.c
+++ b/src/indicator-printers.c
@@ -1,7 +1,9 @@
/*
* Copyright 2012 Canonical Ltd.
+ * Copyright 2022 Robert Tari
*
* Authors: Lars Uebernickel <lars.uebernickel@canonical.com>
+ * Robert Tari <robert@tari.in>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -16,8 +18,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
-
#include "indicator-printers.h"
#include "indicator-menu-item.h"
#include "dbus-names.h"