Skip to content

Commit f802a73

Browse files
committed
Move some import export defines to common engine header
1 parent a16f29d commit f802a73

File tree

29 files changed

+94
-120
lines changed

29 files changed

+94
-120
lines changed

src/Common/Common.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
#pragma once
2+
3+
#include "Common/CommonImportExport.inl"
4+

src/Common/Common.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
<ItemGroup>
211211
<ClCompile Include="NvMender2003\NVMeshMender.cpp" />
212212
</ItemGroup>
213+
<ItemGroup>
214+
<None Include="CommonImportExport.inl" />
215+
</ItemGroup>
213216
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
214217
<ImportGroup Label="ExtensionTargets">
215218
</ImportGroup>

src/Common/Common.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,7 @@
102102
<Filter>NvMender2003</Filter>
103103
</ClCompile>
104104
</ItemGroup>
105+
<ItemGroup>
106+
<None Include="CommonImportExport.inl" />
107+
</ItemGroup>
105108
</Project>

src/Common/CommonImportExport.inl

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#pragma once
2+
3+
#ifdef XRAPI_EXPORTS
4+
#define XRAPI_API XR_EXPORT
5+
#else
6+
#define XRAPI_API XR_IMPORT
7+
#endif
8+
9+
#ifdef XRAICORE_EXPORTS
10+
#define XRAICORE_API XR_EXPORT
11+
#else
12+
#define XRAICORE_API XR_IMPORT
13+
#endif
14+
15+
#ifdef XRCDB_EXPORTS
16+
#define XRCDB_API XR_EXPORT
17+
#else
18+
#define XRCDB_API XR_IMPORT
19+
#endif
20+
21+
#ifdef XRCORE_EXPORTS
22+
#define XRCORE_API XR_EXPORT
23+
#else
24+
#define XRCORE_API XR_IMPORT
25+
#endif
26+
27+
#ifdef XRGAMESPY_EXPORTS
28+
#define XRGAMESPY_API XR_EXPORT
29+
#else
30+
#define XRGAMESPY_API XR_IMPORT
31+
#endif
32+
33+
#ifdef XR_NETSERVER_EXPORTS
34+
#define XRNETSERVER_API XR_EXPORT
35+
#else
36+
#define XRNETSERVER_API XR_IMPORT
37+
#endif
38+
39+
#ifdef XR_PARTICLES_EXPORTS
40+
#define PARTICLES_API XR_EXPORT
41+
#else
42+
#define PARTICLES_API XR_IMPORT
43+
#endif
44+
45+
#ifdef XRPHYSICS_EXPORTS
46+
#define XRPHYSICS_API XR_EXPORT
47+
#else
48+
#define XRPHYSICS_API XR_IMPORT
49+
#endif
50+
51+
#ifdef XRSCRIPTENGINE_EXPORTS
52+
#define XRSCRIPTENGINE_API XR_EXPORT
53+
#else
54+
#define XRSCRIPTENGINE_API XR_IMPORT
55+
#endif
56+
57+
#ifdef XRSOUND_EXPORTS
58+
#define XRSOUND_API XR_EXPORT
59+
#else
60+
#define XRSOUND_API XR_IMPORT
61+
#endif

src/Include/xrAPI/xrAPI.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
#pragma once
22

3-
#ifdef XRAPI_EXPORTS
4-
#define XRAPI_API XR_EXPORT
5-
#else
6-
#define XRAPI_API XR_IMPORT
7-
#endif
8-
93
class IRender;
104
class IRenderFactory;
115
class IDebugRender;

src/xrAICore/xrAICore.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
#pragma once
2-
3-
#ifdef XRAICORE_EXPORTS
4-
#define XRAICORE_API XR_EXPORT
5-
#else
6-
#define XRAICORE_API XR_IMPORT
7-
#endif

src/xrCDB/xrCDB.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44

55
#include "xrCore/Threading/Lock.hpp" // XXX: Remove from header. Put in .cpp.
66

7-
// The following ifdef block is the standard way of creating macros which make exporting
8-
// from a DLL simpler. All files within this DLL are compiled with the XRCDB_EXPORTS
9-
// symbol defined on the command line. this symbol should not be defined on any project
10-
// that uses this DLL. This way any other project whose source files include this file see
11-
// XRCDB_API functions as being imported from a DLL, wheras this DLL sees symbols
12-
// defined with this macro as being exported.
13-
14-
#ifdef XRCDB_EXPORTS
15-
#define XRCDB_API XR_EXPORT
16-
#else
17-
#define XRCDB_API XR_IMPORT
18-
#endif
19-
207
// forward declarations
218
class CFrustum;
229
namespace Opcode

src/xrCore/FTimer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#ifndef FTimerH
33
#define FTimerH
44
#include "_types.h"
5-
#include "xrCore_impexp.h"
65
#include "xrCommon/xr_vector.h"
76
//#include "_stl_extensions.h"
87
#include "_math.h"

src/xrCore/Threading/Lock.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#pragma once
2-
#include "xrCore/xrCore_impexp.h"
3-
42
#include <mutex>
53
#include <atomic>
64

src/xrCore/_compressed_normal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#ifndef _COMPR_NORMAL_
33
#define _COMPR_NORMAL_
44
#include "xrCore/_types.h"
5-
#include "xrCore/xrCore_impexp.h"
65

76
// fwd. decl.
87
template <class T> struct _vector3; typedef _vector3<float> Fvector;

0 commit comments

Comments
 (0)