From be468e9659bc275c3e35a71b847f23a2e498d3d8 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sun, 14 Aug 2022 19:44:46 +0200 Subject: Add CMakeLists.txt files --- src/CMakeLists.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/CMakeLists.txt (limited to 'src') 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}) -- cgit v1.2.3 From f487079db3dc94c0b9c80d69430d163a6f388996 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sun, 14 Aug 2022 20:20:05 +0200 Subject: Drop Automake files --- src/Makefile.am | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/Makefile.am (limited to 'src') 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 -- cgit v1.2.3 From 9e5b57ca293414e51f82f70dd374b70798d08d44 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sun, 14 Aug 2022 20:24:43 +0200 Subject: Drop all references to config.h --- src/indicator-printers-service.c | 3 ++- src/indicator-printers.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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 + * Robert Tari * * 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 #include #include "dbus-names.h" -#include "config.h" #include #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 + * Robert Tari * * 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 . */ -#include "config.h" - #include "indicator-printers.h" #include "indicator-menu-item.h" #include "dbus-names.h" -- cgit v1.2.3