Skip to content

Commit 61dfab1

Browse files
committed
Move ENGINE_API defines to CommonImportExport.inl
1 parent e528d45 commit 61dfab1

File tree

11 files changed

+19
-33
lines changed

11 files changed

+19
-33
lines changed

Externals/OPCODE/pch.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,4 @@ IC void cdelete(T*& ptr)
5555
}
5656
}
5757

58-
#define ENGINE_API
59-
#include "opcode.h"
58+
#include "Opcode.h"

src/Common/CommonImportExport.inl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#ifdef XRCDB_EXPORTS
1616
#define XRCDB_API XR_EXPORT
17+
#define NO_ENGINE_API
1718
#else
1819
#define XRCDB_API XR_IMPORT
1920
#endif
@@ -44,6 +45,7 @@
4445

4546
#ifdef XRPHYSICS_EXPORTS
4647
#define XRPHYSICS_API XR_EXPORT
48+
#define NO_ENGINE_API
4749
#else
4850
#define XRPHYSICS_API XR_IMPORT
4951
#endif
@@ -59,3 +61,18 @@
5961
#else
6062
#define XRSOUND_API XR_IMPORT
6163
#endif
64+
65+
#ifndef ENGINE_API
66+
#ifndef NO_ENGINE_API
67+
#ifdef ENGINE_BUILD
68+
#define DLL_API XR_IMPORT
69+
#define ENGINE_API XR_EXPORT
70+
#else
71+
#define DLL_API XR_EXPORT
72+
#define ENGINE_API XR_IMPORT
73+
#endif
74+
#else
75+
#define ENGINE_API
76+
#define DLL_API
77+
#endif // !NO_ENGINE_API
78+
#endif // !ENGINE_API

src/xrCDB/StdAfx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ IC void cdelete(T*& ptr)
5555
}
5656
}
5757

58-
#define ENGINE_API
5958
#include "OPCODE/Opcode.h"
6059

6160
//{{AFX_INSERT_LOCATION}}

src/xrCDB/xrCDB.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@
416416
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
417417
</ProjectReference>
418418
<ProjectReference Include="..\..\Externals\OPCODE\OPCODE.vcxproj">
419-
<Project>{bf40459f-302d-4128-a1b6-c965db90e7f0}</Project>
419+
<Project>{dafd6d98-3dcd-40ad-bc85-ec71797b6767}</Project>
420420
</ProjectReference>
421421
<ProjectReference Include="..\utils\xrMiscMath\xrMiscMath.vcxproj">
422422
<Project>{7885cf3c-ee04-4c67-9467-1fbf9a36b037}</Project>

src/xrEngine/Engine.h

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

3-
// you must define ENGINE_BUILD then building the engine itself
4-
// and not define it if you are about to build DLL
5-
6-
#include "Engine_impexp.h"
73
#include "engineAPI.h"
84
#include "eventAPI.h"
95
#include "xrSheduler.h"

src/xrEngine/Engine_impexp.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/xrEngine/xrEngine.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,6 @@
760760
<ClInclude Include="EffectorPP.h" />
761761
<ClInclude Include="Engine.h" />
762762
<ClInclude Include="EngineAPI.h" />
763-
<ClInclude Include="Engine_impexp.h" />
764763
<ClInclude Include="engine_impl.hpp" />
765764
<ClInclude Include="EnnumerateVertices.h" />
766765
<ClInclude Include="Environment.h" />

src/xrEngine/xrEngine.vcxproj.filters

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@
561561
<ClInclude Include="profiler_inline.h">
562562
<Filter>General\Profiler</Filter>
563563
</ClInclude>
564-
<ClInclude Include="Engine_impexp.h" />
565564
</ItemGroup>
566565
<ItemGroup>
567566
<ClCompile Include="defines.cpp">

src/xrEngine/xrSheduler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#define XRSHEDULER_H_INCLUDED
44

55
//#include "ISheduled.h"
6-
#include "Engine_impexp.h"
76
class ISheduled;
87

98
class ENGINE_API CSheduler

src/xrPhysics/stdafx.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#include "Common/Common.hpp"
55

66
#define MTL_EXPORT_API
7-
#define ENGINE_API
8-
#define DLL_API
97
#define ECORE_API
108

119
#include "xrCore/xrCore.h"

0 commit comments

Comments
 (0)