Skip to content

Commit 5365fe6

Browse files
committed
Add xrUICore to cmake and fix builds
1 parent 87b3b8b commit 5365fe6

File tree

8 files changed

+25
-10
lines changed

8 files changed

+25
-10
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ add_subdirectory(Layers)
33
add_subdirectory(xr_3da)
44
#add_subdirectory(xrMisc)
55
add_subdirectory(xrAICore)
6+
add_subdirectory(xrUICore)
67
add_subdirectory(xrCDB)
78
add_subdirectory(xrCore)
89
add_subdirectory(xrEngine)

src/xrGame/ui/UIWindow_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ SCRIPT_EXPORT(SServerFilters, (), {
8181
];
8282
});
8383

84+
#ifndef LINUX // FIXME!!!
8485
SCRIPT_EXPORT(connect_error_cb, (), {
8586
module(luaState)
8687
[
8788
class_<connect_error_cb>("connect_error_cb")
8889
.def(constructor<>())
8990
.def(constructor<connect_error_cb::lua_object_type, connect_error_cb::lua_function_type>())
90-
#ifndef LINUX // FIXME!!!
9191
.def("bind", &connect_error_cb::bind)
92-
#endif
9392
.def("clear", &connect_error_cb::clear)
9493
];
9594
});
95+
#endif
9696

9797
SCRIPT_EXPORT(CServerList, (CUIWindow), {
9898
module(luaState)

src/xrUICore/CMakeLists.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,16 @@ message("path " ${CMAKE_CURRENT_SOURCE_DIR})
6262

6363
add_definitions(-DXRUICORE_EXPORTS -D_SECURE_SCL=0)
6464

65-
add_compile_options(/fp:fast "/Yupch.hpp")
66-
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES COMPILE_FLAGS /Yc)
65+
if (WIN32)
66+
add_compile_options(/fp:fast "/Yupch.hpp")
67+
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES COMPILE_FLAGS /Yc)
68+
endif()
69+
70+
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
71+
set(LUAJIT_LIBRARIES luajit-debug)
72+
else()
73+
set(LUAJIT_LIBRARIES luajit)
74+
endif()
6775

6876
add_library(xrUICore SHARED ${ARROW} ${BUTTONS} ${CALLBACKS}
6977
${COMBO_BOX} ${CURSOR}
@@ -75,5 +83,10 @@ add_library(xrUICore SHARED ${ARROW} ${BUTTONS} ${CALLBACKS}
7583
${GENERAL})
7684

7785
set_target_properties(xrUICore PROPERTIES PREFIX "")
78-
target_include_directories(xrUICore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ../../Externals/lzo/include)
79-
target_link_libraries(xrUICore xrAPI pugixml xrScriptEngine LuaJIT xrEngine xrMiscMath xrCore luabind)
86+
target_include_directories(xrUICore PRIVATE
87+
${CMAKE_CURRENT_SOURCE_DIR}
88+
${CMAKE_CURRENT_SOURCE_DIR}/../
89+
../../Externals/lzo/include
90+
../../Externals/luabind
91+
${SDL_INCLUDE_DIRS})
92+
target_link_libraries(xrUICore xrAPI pugixml xrScriptEngine ${LUAJIT_LIBRARIES} xrEngine xrMiscMath xrCore luabind ${SDL_LIBRARIES})

src/xrUICore/ComboBox/UIComboBox_script.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "pch.hpp"
1111
#include "UIComboBox.h"
12-
#include "ListBox\UIListBoxItem.h"
12+
#include "ListBox/UIListBoxItem.h"
1313
#include "xrScriptEngine/ScriptExporter.hpp"
1414

1515
using namespace luabind;

src/xrUICore/ScrollBar/UIFixedScrollBar.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "pch.hpp"
2+
#include "UIFixedScrollBar.h"
23
#include "Buttons/UI3tButton.h"
34
#include "Windows/UIFrameLineWnd.h"
45
#include "UIScrollBox.h"

src/xrUICore/Static/UIStatic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "XML/UITextureMaster.h"
66
#include "xrEngine/LightAnimLibrary.h"
7-
#include "Lines/uiLines.h"
7+
#include "Lines/UILines.h"
88
#include "Include/xrRender/UIRender.h"
99
#include "Buttons/UIBtnHint.h"
1010
#include "Cursor/UICursor.h"

src/xrUICore/TabControl/UITabButton.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "pch.hpp"
22
#include "UITabButton.h"
3-
#include "xrEngine\xr_input_xinput.h"
3+
#include "xrEngine/xr_input_xinput.h"
44

55
CUITabButton::CUITabButton() {}
66
CUITabButton::~CUITabButton() {}

src/xrUICore/Windows/UIWindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "Cursor/UICursor.h"
44
#include "Include/xrRender/DebugRender.h"
55
#include "Include/xrRender/UIRender.h"
6-
#include "xrEngine\xr_input_xinput.h"
6+
#include "xrEngine/xr_input_xinput.h"
77

88
xr_vector<Frect> g_wnds_rects;
99
BOOL g_show_wnd_rect2 = FALSE;

0 commit comments

Comments
 (0)