summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacques GUILLOU <jacques.guillou@pelagicore.com>2014-11-19 12:48:18 +0100
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-04-02 13:44:03 +0200
commitcb4950d12a96cc51557e185fc555edd4b4a0ca62 (patch)
treec039ee2fa6253598e316754cca126bc3ece9e8ff /src
parent2cec5d20ae0b5361a84bfb8170335f2502ddd88f (diff)
downloadDLT-daemon-cb4950d12a96cc51557e185fc555edd4b4a0ca62.tar.gz
Remove absolute installation paths so that DLT can be installed at any location (not only "/usr").
Signed-off-by: Jacques GUILLOU <jacques.guillou@pelagicore.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/daemon/CMakeLists.txt4
-rw-r--r--src/daemon/dlt-daemon.c4
-rw-r--r--src/dbus/CMakeLists.txt5
-rw-r--r--src/system/CMakeLists.txt4
-rw-r--r--src/system/dlt-system.h2
-rw-r--r--src/tests/CMakeLists.txt4
6 files changed, 15 insertions, 8 deletions
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 8ab6711..42d2081 100755
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -30,4 +30,6 @@ install(TARGETS dlt-daemon
WORLD_EXECUTE WORLD_READ
COMPONENT base)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlt.conf DESTINATION /etc COMPONENT base)
+INSTALL(FILES dlt.conf
+ DESTINATION ${CONFIGURATION_FILES_DIR}
+ COMPONENT base)
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 6c44da5..b8b8ae9 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -91,7 +91,7 @@ void usage()
printf("Options:\n");
printf(" -d Daemonize\n");
printf(" -h Usage\n");
- printf(" -c filename DLT daemon configuration file (Default: /etc/dlt.conf)\n");
+ printf(" -c filename DLT daemon configuration file (Default: " CONFIGURATION_FILES_DIR "/dlt.conf)\n");
} /* usage() */
/**
@@ -196,7 +196,7 @@ int option_file_parser(DltDaemonLocal *daemon_local)
if(daemon_local->flags.cvalue[0])
filename = daemon_local->flags.cvalue;
else
- filename = "/etc/dlt.conf";
+ filename = CONFIGURATION_FILES_DIR "/dlt.conf";
//printf("Load configuration from file: %s\n",filename);
pFile = fopen (filename,"r");
diff --git a/src/dbus/CMakeLists.txt b/src/dbus/CMakeLists.txt
index b1c222c..6b457be 100644
--- a/src/dbus/CMakeLists.txt
+++ b/src/dbus/CMakeLists.txt
@@ -30,5 +30,6 @@ install(TARGETS dlt-dbus
RUNTIME DESTINATION bin
COMPONENT base)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlt-dbus.conf DESTINATION /etc COMPONENT base)
-
+INSTALL(FILES dlt-dbus.conf
+ DESTINATION ${CONFIGURATION_FILES_DIR}
+ COMPONENT base)
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt
index 7768b5a..8398207 100644
--- a/src/system/CMakeLists.txt
+++ b/src/system/CMakeLists.txt
@@ -35,4 +35,6 @@ install(TARGETS dlt-system
RUNTIME DESTINATION bin
COMPONENT base)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dlt-system.conf DESTINATION /etc COMPONENT base)
+INSTALL(FILES dlt-system.conf
+ DESTINATION ${CONFIGURATION_FILES_DIR}
+ COMPONENT base)
diff --git a/src/system/dlt-system.h b/src/system/dlt-system.h
index 211b198..07cc2d6 100644
--- a/src/system/dlt-system.h
+++ b/src/system/dlt-system.h
@@ -57,7 +57,7 @@
#include "dlt_common.h"
// Constants
-#define DEFAULT_CONF_FILE "/etc/dlt-system.conf"
+#define DEFAULT_CONF_FILE ( CONFIGURATION_FILES_DIR "/dlt-system.conf")
#define DLT_SYSTEM_LOG_FILE_MAX 32
#define DLT_SYSTEM_LOG_DIRS_MAX 32
#define DLT_SYSTEM_LOG_PROCESSES_MAX 32
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index b36454d..7c1f0f2 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -57,4 +57,6 @@ install(TARGETS dlt-test-multi-process dlt-test-multi-process-client dlt-test-us
RUNTIME DESTINATION bin
COMPONENT base)
-INSTALL(FILES dlt-test-filetransfer-file dlt-test-filetransfer-image.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/dlt-filetransfer)
+INSTALL(FILES dlt-test-filetransfer-file dlt-test-filetransfer-image.png
+ DESTINATION share/dlt-filetransfer
+)