summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/base/main.h1
-rw-r--r--src/base/path.h38
-rw-r--r--src/base/path.h.in34
-rw-r--r--src/modules/CMakeLists.txt2
5 files changed, 36 insertions, 41 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 039b6ff..b38714a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -64,7 +64,7 @@ SET ( SRC_client
${WORKDIR}/widget/widget_textfield ${WORKDIR}/widget/widget_label
${WORKDIR}/widget/widget_buttonimage ${WORKDIR}/widget/widget_image
${WORKDIR}/widget/widget_select ${WORKDIR}/widget/widget_catchkey
- ${WORKDIR}/widget/widget_choicegroup ${WORKDIR}/widget/widget
+ ${WORKDIR}/widget/widget_choicegroup ${WORKDIR}/widget/widget
)
SET ( SRC_audio
diff --git a/src/base/main.h b/src/base/main.h
index cfa4ee0..b50e56c 100644
--- a/src/base/main.h
+++ b/src/base/main.h
@@ -13,7 +13,6 @@
#include <libintl.h>
#include <locale.h>
#endif
- #include "../../config.h"
#include "bool.h"
#include "string_length.h"
#include "path.h"
diff --git a/src/base/path.h b/src/base/path.h
deleted file mode 100644
index 3c44600..0000000
--- a/src/base/path.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-#ifndef PATH_H
- #define PATH_H
- #ifndef PREFIX
- #ifndef __WIN32__
- #define PREFIX "/usr/local"
- #else
- #define PREFIX ".."
- #endif
- #endif
- #ifndef PUBLIC_SERVER
- #define PATH_DIR PREFIX "/share/tuxanci/"
- #ifndef __WIN32__
- #define PATH_MODULES PREFIX "/lib/tuxanci/"
- #else
- #define PATH_MODULES PREFIX "/bin/"
- #endif
- #else
- #define PATH_DIR PREFIX "/share/tuxanci-server/"
- #ifndef __WIN32__
- #define PATH_MODULES PREFIX "/lib/tuxanci-server/"
- #define SERVER_CONFIG "/etc/tuxanci-server/server.conf"
- #else
- #define PATH_MODULES PREFIX "/bin/"
- #define SERVER_CONFIG PREFIX "/etc/tuxanci-server/server.conf"
- #endif
- #endif
- #define PATH_IMAGE PATH_DIR "image/"
- #define PATH_FONT PATH_DIR "font/"
- #define PATH_ARENA PATH_DIR "arena/"
- #define PATH_SOUND PATH_DIR "sound/"
- #define PATH_MUSIC PATH_DIR "music/"
- #define PATH_CONFIG PATH_DIR "conf/"
- #define PATH_LANG PATH_DIR "lang/"
- #define PATH_DATA PATH_DIR "doc/"
- #define PATH_LOCALE PREFIX "share/locale/"
- #include "main.h"
-#endif
diff --git a/src/base/path.h.in b/src/base/path.h.in
new file mode 100644
index 0000000..93750e6
--- /dev/null
+++ b/src/base/path.h.in
@@ -0,0 +1,34 @@
+
+#ifndef PATH_H
+ #cmakedefine USE_MAGICK
+ #define TUXANCI_VERSION "@TUXANCI_VERSION@"
+ #define PATH_H
+ #ifndef __WIN32__
+ #define PREFIX "@CMAKE_INSTALL_PREFIX@"
+ #else
+ #define PREFIX ".."
+ #endif
+ #ifdef PUBLIC_SERVER
+ #define APPNAME "tuxanci-server"
+ #else
+ #define APPNAME "tuxanci"
+ #endif
+ #define PATH_DIR PREFIX "/share/" APPNAME "/"
+ #ifndef __WIN32__
+ #define PATH_MODULES PREFIX "/lib/" APPNAME
+ #define SERVER_CONFIG "/etc/tuxanci-server/server.conf"
+ #else
+ #define PATH_MODULES PREFIX "/bin/"
+ #define SERVER_CONFIG PREFIX "/etc/tuxanci-server/server.conf"
+ #endif
+ #define PATH_IMAGE PATH_DIR "image/"
+ #define PATH_FONT PATH_DIR "font/"
+ #define PATH_ARENA PATH_DIR "arena/"
+ #define PATH_SOUND PATH_DIR "sound/"
+ #define PATH_MUSIC PATH_DIR "music/"
+ #define PATH_CONFIG PATH_DIR "conf/"
+ #define PATH_LANG PATH_DIR "lang/"
+ #define PATH_DATA PATH_DIR "doc/"
+ #define PATH_LOCALE PREFIX "share/locale/"
+ #include "main.h"
+#endif
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index 7b8a6ea..6931f68 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -52,7 +52,7 @@ SET ( SRC_modAI
modAI.c
)
###############################################################################
-# COMPILATION ITSELF
+# COMPILATION AND INSTALLATION ITSELF
###############################################################################
ADD_LIBRARY ( modWall SHARED ${SRC_modWall} )
ADD_LIBRARY ( modPipe SHARED ${SRC_modPipe} )