Skip to content

Commit 0d7cdb6

Browse files
committed
xrCDB: added to cmake
1 parent cd1aafe commit 0d7cdb6

File tree

7 files changed

+24
-2
lines changed

7 files changed

+24
-2
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
add_subdirectory(Layers)
33
#add_subdirectory(xrMisc)
44
#add_subdirectory(xrAICore)
5-
#add_subdirectory(xrCDB)
5+
add_subdirectory(xrCDB)
66
add_subdirectory(xrCore)
77
#add_subdirectory(xrEngine)
88
#add_subdirectory(xrGame)

src/xrCDB/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
project(xrCDB)
2+
3+
list(APPEND DIRS
4+
"."
5+
)
6+
7+
add_dir("${DIRS}")
8+
9+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include)
10+
11+
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
12+
13+
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
14+
target_link_libraries(${PROJECT_NAME} xrCore OPCODE xrAPI)

src/xrCDB/ISpatial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "xrEngine/xr_object.h"
77
#include "xrEngine/PS_Instance.h"
88
#endif
9-
#include "xrEngine/Device.h"
9+
#include "xrEngine/device.h"
1010
#include "xrEngine/GameFont.h"
1111
#include "xrEngine/PerformanceAlert.hpp"
1212
#include "xrCore/Threading/Lock.hpp"
File renamed without changes.

src/xrCDB/xrCDB.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace Opcode
1414
using namespace CDB;
1515
using namespace Opcode;
1616

17+
#if defined(WINDOWS)
1718
BOOL APIENTRY DllMain(HANDLE hModule, u32 ul_reason_for_call, LPVOID lpReserved)
1819
{
1920
switch (ul_reason_for_call)
@@ -25,6 +26,7 @@ BOOL APIENTRY DllMain(HANDLE hModule, u32 ul_reason_for_call, LPVOID lpReserved)
2526
}
2627
return TRUE;
2728
}
29+
#endif
2830

2931
// Model building
3032
MODEL::MODEL() :

src/xrCDB/xr_area_raypick.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#include "xrEngine/xr_collide_form.h"
55
#include "xrEngine/xr_object.h"
66
#include "Intersect.hpp"
7+
#if defined(WINDOWS)
78
#include "d3d9types.h"
9+
#endif
810

911
#ifdef DEBUG
1012
static BOOL _cdb_bDebug = false;

src/xrEngine/xr_object.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ class CInifile;
2626
#define CROW_RADIUS2 (60.f)
2727

2828
class IPhysicsShell;
29+
#if defined(WINDOWS)
2930
xr_pure_interface IObjectPhysicsCollision;
31+
#endif
3032

3133
class CAttachmentOwner;
3234
class CInventoryOwner;
@@ -186,7 +188,9 @@ class IGameObject : public virtual IFactoryObject,
186188
virtual IRenderVisual* Visual() const = 0;
187189
virtual void OnChangeVisual() = 0;
188190
virtual IPhysicsShell* physics_shell() = 0;
191+
#if defined(WINDOWS)
189192
virtual const IObjectPhysicsCollision* physics_collision() = 0;
193+
#endif
190194
// Name management
191195
virtual shared_str cName() const = 0;
192196
virtual void cName_set(shared_str N) = 0;

0 commit comments

Comments
 (0)