Skip to content

Commit ebb77e3

Browse files
committed
fixed:centos and macos build error
1 parent 95be15c commit ebb77e3

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

XEngine_Source/XEngine_ModulePlugin/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SHAREFLAG = -shared
33
SHAREDLL = so
44
RELEASE = 0
55
UNICODE = 0
6+
FILECENTOS=/etc/redhat-release
67
INCLUDE = -I ./
78
LOADBIN = -L /usr/local/lib/XEngine_Release/XEngine_BaseLib
89
LIB = -lXEngine_BaseLib -llua5.3
@@ -27,10 +28,10 @@ FLAGS = -c
2728
DEBUG = -g
2829
endif
2930

30-
ifeq ($(UNICODE),1)
31-
UNICODE = -D _UNICODE
31+
ifeq ($(FILECENTOS), $(wildcard $(FILECENTOS)))
32+
UNICODE = -D _CENTOS
3233
else
33-
UNICODE =
34+
UNICODE = -D _UBUNTU
3435
endif
3536

3637

XEngine_Source/XEngine_ModulePlugin/pch.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,20 @@
1414
#include <lua.hpp>
1515
#else
1616
#include <dlfcn.h>
17+
18+
#ifdef __linux__
19+
#ifdef _CENTOS
20+
#include <lua/lua.hpp>
21+
#else
1722
#include <lua5.3/lua.hpp>
1823
#endif
24+
#else
25+
#include <lua/lua.hpp>
26+
#endif
27+
#endif
28+
1929
#endif //PCH_H
30+
2031
#include <stdio.h>
2132
#include <stdlib.h>
2233
#include <string.h>

0 commit comments

Comments
 (0)