Skip to content

Commit

Permalink
Rename SERVICE_NAME to SYSTEMD_SERVICE_NAME
Browse files Browse the repository at this point in the history
This makes the name's meaning much less ambiguous.
  • Loading branch information
beroset authored Mar 22, 2022
1 parent b1c70ba commit 76f57ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ option(WITH_DOC "Create project documentation" OFF)
if (SAILFISHOS_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(SERVICE_NAME "harbour-asteroidsyncserviced.service")
set(SYSTEMD_SERVICE_NAME "harbour-asteroidsyncserviced.service")
elseif (UBUNTU_TOUCH_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(SERVICE_NAME "")
set(SYSTEMD_SERVICE_NAME "")
elseif (DESKTOP_PLATFORM)
set(PLATFORM_SOURCE_DIR "platforms/sailfishos")
set(DAEMON_PLATFORM_SOURCE_DIR "platforms/ubuntutouch")
set(SERVICE_NAME "asteroidsync.service")
set(SYSTEMD_SERVICE_NAME "asteroidsync.service")
else()
message(FATAL_ERROR "no platform selected: you must enable one of SAILFISHOS_PLATFORM or UBUNTU_TOUCH_PLATFORM or DESKTOP_PLATFORM")
endif()

include(GNUInstallDirs)

configure_file(
"asteroidsyncservice_config.h.in"
"asteroidsyncservice_config.h"
Expand Down
2 changes: 1 addition & 1 deletion asteroidsyncservice/platforms/sailfishos/servicecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <QDBusInterface>
#include <QObject>

static const QString SYNCSERVICED_SYSTEMD_UNIT(SERVICE_NAME);
static const QString SYNCSERVICED_SYSTEMD_UNIT(SYSTEMD_SERVICE_NAME);

class ServiceControl : public QObject
{
Expand Down
2 changes: 1 addition & 1 deletion asteroidsyncservice_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
#define CONFIG_H

#define VERSION "${asteroidsyncservice_VERSION_MAJOR}.${asteroidsyncservice_VERSION_MINOR}"
#define SERVICE_NAME "${SERVICE_NAME}"
#define SYSTEMD_SERVICE_NAME "${SYSTEMD_SERVICE_NAME}"

#endif // CONFIG_H

0 comments on commit 76f57ae

Please sign in to comment.