forked from volca02/openDarkEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h.cmake
56 lines (46 loc) · 1.65 KB
/
config.h.cmake
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
#ifndef _CONFIG_H
#define _CONFIG_H
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine OPDE_DEBUG
#define OPDE_VER_MAJOR ${OPDE_VER_MAJOR}
#define OPDE_VER_MINOR ${OPDE_VER_MINOR}
#define OPDE_VER_PATCH ${OPDE_VER_PATCH}
#define OPDE_CODE_NAME "${REL_CODE_NAME}"
#cmakedefine __OPDE_BIG_ENDIAN ${BIG_ENDIAN}
#if defined (_MSC_VER)
// disable the class needs to have a dll-interface...
#pragma warning(disable:4251)
// No suitable definition for explicit template spec warning disable
#pragma warning(disable:4661)
#endif
// DLL export/import stuff for OpdeLib
// If the build target is OpdeLib, the OpdeLib_EXPORTS is defined,
// otherwise it is not. Trouble is we need it unset for all library targets,
// so that all the static libs build and can be linked together.
// We also want OPDELIB_EXPORT to be dllimport for executables
// Thus, we define our own macros in the CMakeLists.txt files that define the
// contents of the OPDELIB_EXPORT
#if defined (_WIN32) // It is said that mingw also tolerates __declspec
#if defined(OPDELIB_DLL_TARGET)
#define OPDELIB_EXPORT __declspec(dllexport)
#elif defined(OPDE_EXE_TARGET)
#define OPDELIB_EXPORT __declspec(dllimport)
#else
#define OPDELIB_EXPORT
#endif /* OpdeLib_EXPORTS */
#elif defined(GCC4)
#if defined(OPDELIB_DLL_TARGET)
#define OPDELIB_EXPORT __attribute__ ((visibility("default")))
#endif /* OPDELIB_DLL_TARGET */
#else /* defined (GCC4) */
#define OPDELIB_EXPORT
#endif
// platforms
#cmakedefine WIN32
#cmakedefine UNIX
#cmakedefine APPLE
// data installation path
#define OPDE_SHARE_DIR "${OPDE_FULL_DATA_INSTALL_DIR}"
// Script compilers present
#cmakedefine SCRIPT_COMPILERS
#endif