summaryrefslogtreecommitdiff
path: root/config.h.in
blob: e7c7e5d134b815fcc0e8487449bfb1f7e5244652 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * config.h.in
 *
 * Tries to fix various differences in compilers and libraries.
 *
 */

#ifndef __CONFIG_H__
#define __CONFIG_H__

#define PROJECT_NAME "${PROJECT_NAME}"
#define PROJECT_VERSION "${PROJECT_VERSION}"
#define PROJECT_URL "${project_URL}"

#cmakedefine OPTION_NOINSTALL

#ifdef OPTION_NOINSTALL
	/* For developers. */
	#define PROJECT_DOC_DIR "${CMAKE_SOURCE_DIR}/docs/"
	#define PROJECT_SHARE_DIR "${CMAKE_SOURCE_DIR}/share/"
	#define PROJECT_GSETTINGS_DIR "${CMAKE_BINARY_DIR}"
#elif defined (_WIN32)
	#define PROJECT_DOC_DIR "share/doc/${PROJECT_NAME}/"
	#define PROJECT_SHARE_DIR "share/${PROJECT_NAME}/"
#else
	#define PROJECT_DOC_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}/"
	#define PROJECT_SHARE_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/"
#endif


#include <glib/gi18n.h>

#define GETTEXT_DOMAIN "${PROJECT_NAME}"
#ifdef _WIN32
	#define GETTEXT_DIRNAME "share/locale"
#else
	#define GETTEXT_DIRNAME "${CMAKE_INSTALL_PREFIX}/share/locale"
#endif


/* We have to remove nodes first due to a bug in json-glib. */
#define json_object_set_member(object, name, node) \
	G_STMT_START { \
		json_object_remove_member ((object), (name)); \
		json_object_set_member ((object), (name), (node)); \
	} G_STMT_END

#endif /* __CONFIG_H__ */