-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathWkPlatform.h.config
154 lines (124 loc) · 5.96 KB
/
WkPlatform.h.config
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/* *
* Copyright (c) 2009, Asmodehn's Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - either the name of the Asmodehn's Corp. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef WKPLATFORM_@PROJECT_NAME@_HH
#define WKPLATFORM_@PROJECT_NAME@_HH
/* Project detection */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_PROJECT_NAME "${WK_@PROJECT_NAME@_PROJECT_NAME}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_VERSION "${WK_@PROJECT_NAME@_VERSION}"
/* Platform type detection, CMake Based */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_PLATFORM "${WK_@PROJECT_NAME@_PLATFORM}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_PLATFORM_IS_WIN32
@CMAKEDEFINE@ WK_@PROJECT_NAME@_PLATFORM_IS_APPLE
@CMAKEDEFINE@ WK_@PROJECT_NAME@_PLATFORM_IS_UNIX
/* Advanced System detection, CMake based */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_NAME "${WK_@PROJECT_NAME@_SYSTEM_NAME}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_VERSION "${WK_@PROJECT_NAME@_SYSTEM_VERSION}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_PROCESSOR "${WK_@PROJECT_NAME@_SYSTEM_PROCESSOR}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_IS_WINDOWS
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_IS_MACOSX
@CMAKEDEFINE@ WK_@PROJECT_NAME@_SYSTEM_IS_LINUX
/* Compiler type detection, CMake based */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_COMPILER "${WK_@PROJECT_NAME@_COMPILER}"
@CMAKEDEFINE@ WK_@PROJECT_NAME@_COMPILER_IS_MSVC
@CMAKEDEFINE@ WK_@PROJECT_NAME@_COMPILER_IS_GNUCC
@CMAKEDEFINE@ WK_@PROJECT_NAME@_COMPILER_IS_GNUCXX
/* Advanced Compiler Environment Detection */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_HAS_UNISTD_H
#ifdef WK_@PROJECT_NAME@_HAS_UNISTD_H
#define WK_@PROJECT_NAME@_PLATFORM_POSIX
#endif
/*adjusting declspec values*/
/* Generic helper definitions for shared library support */
#if defined(WK_@PROJECT_NAME@_PLATFORM_IS_WIN32)
#define WK_@PROJECT_NAME@_HELPER_DLL_IMPORT __declspec(dllimport)
#define WK_@PROJECT_NAME@_HELPER_DLL_EXPORT __declspec(dllexport)
#define WK_@PROJECT_NAME@_HELPER_DLL_LOCAL
#else
#if defined(WK_@PROJECT_NAME@_COMPILER_IS_GNUCC) && (__GNUC__ >= 4)
#define WK_@PROJECT_NAME@_HELPER_DLL_IMPORT __attribute__ ((visibility("default")))
#define WK_@PROJECT_NAME@_HELPER_DLL_EXPORT __attribute__ ((visibility("default")))
#define WK_@PROJECT_NAME@_HELPER_DLL_LOCAL __attribute__ ((visibility("hidden")))
#else
#define WK_@PROJECT_NAME@_HELPER_DLL_IMPORT
#define WK_@PROJECT_NAME@_HELPER_DLL_EXPORT
#define WK_@PROJECT_NAME@_HELPER_DLL_LOCAL
#endif
#endif
/*
Now we use the generic helper definitions above to define WK_API and WK_LOCAL.
WK_API is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
WK_LOCAL is used for non-api symbols.
*/
${WK_@PROJECT_NAME@_LIBS_EXPORT_TYPE}
#ifndef NULL
#define NULL 0
#endif
/* Dependency detection, Important to propagate build configuration of libraries... */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_STLPORT
#ifdef WK_@PROJECT_NAME@_FOUND_STLPORT
/* check user_config.h for the following settings */
/* To work as expected, WkPlatform_@[email protected] has to be included in all files, before including any stl header */
/* if it is not possible for some reason, you should modify the stlport/stl/user_config.h header manually */
/* This prevent STLport to rename std:: and therefore avoids confusion and linkage problem with 3d party libs */
/* it also should allow to use multiple STL implementation in the same project */
#define _STLP_DONT_REDEFINE_STD 1
#define _STLP_WHOLE_NATIVE_STD 1
#ifdef _DEBUG
#define _STLP_DEBUG 1
/* This STLP_DEBUG currently generates errors with imported vendor STL :
In file included from /usr/include/stlport/stl/_tree.h:657,
from /usr/include/stlport/stl/_map.h:34,
from /usr/include/stlport/map:36,
/usr/include/stlport/stl/_tree.c:320: error: expected initializer before '<' token
*/
#endif
#endif
/* NB : This must be in sync with WkUtils.cmake macros and variables naming conventions... */
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_SDLIMAGE
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_SDLMIXER
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_SDLTTF
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_SDLNET
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_OPENGL
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_GUICHAN
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_MySql
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_MySQLpp
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_Bullet
@CMAKEDEFINE@ WK_@PROJECT_NAME@_FOUND_LuaJIT
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C"
{
#endif
${WK_@PROJECT_NAME@_LIBS_EXPORT_WKDEBUG}
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#endif /* WKPLATFORM_@PROJECT_NAME@_HH */