Skip to content

Commit 4fefea7

Browse files
committed
upload to new repositroy
0 parents  commit 4fefea7

File tree

3,537 files changed

+1163515
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,537 files changed

+1163515
-0
lines changed

AUTHORS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The AUTHORS file:
2+
3+
This file should collect a trace of all the legal paperwork that you have
4+
exchanged with contributors for your particular package. This information is
5+
very useful for registering the copyright of your package. The file might
6+
have an introductory blurb similar to this one:
7+
8+
Authors of Neo Core
9+
10+
Current Core developers:
11+
Girosz, Kagebunshin, Skyne, drestor, $0undX, Speeros
12+
13+
Current Database developers:
14+
tunnr, Bromia, AximCore
15+
16+
All the time wee ned new developers!!
17+
If u wanna be a dev, write to me an e-mail: [email protected]

CMakeLists.txt

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
PROJECT(Neo)
2+
cmake_minimum_required(VERSION 2.6)
3+
cmake_policy(SET CMP0005 OLD)
4+
5+
include(CheckIncludeFiles)
6+
include(cmake/FindAce.cmake)
7+
include(cmake/FindMySql.cmake)
8+
include(cmake/FindReadline.cmake)
9+
CONFIGURE_FILE(
10+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
11+
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
12+
IMMEDIATE @ONLY)
13+
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
14+
15+
OPTION(DO_MYSQL "With MySQL support" 1)
16+
OPTION(DO_SCRIPTS "With neoscripts" 1)
17+
OPTION(DO_CLI "With CLI" 1)
18+
OPTION(DO_RA "With RA" 0)
19+
OPTION(DO_DEBUG "Debug mode" 0)
20+
OPTION(DO_WARN "Enable all compile warnings" 0)
21+
OPTION(LARGE_CELL "Large cell size" 0)
22+
OPTION(SHORT_SLEEP "Short sleep" 0)
23+
OPTION(CENTOS "CENTOS" 0)
24+
25+
SET(GENREV_SRC
26+
src/tools/genrevision/genrevision.cpp
27+
)
28+
29+
ADD_EXECUTABLE(genrev
30+
${GENREV_SRC}
31+
)
32+
ADD_CUSTOM_TARGET("revision.h" ALL
33+
COMMAND "${Neo_BINARY_DIR}/genrev"
34+
${Neo_SOURCE_DIR}
35+
WORKING_DIRECTORY "${Neo_SOURCE_DIR}/src/shared"
36+
DEPENDS genrev
37+
)
38+
39+
40+
EXECUTE_PROCESS(
41+
# COMMAND svn info | grep -i "Revision" | awk -F' ' '{print $2}' for svn systems
42+
COMMAND hg tip --template {rev}
43+
WORKING_DIRECTORY "${Neo_SOURCE_DIR}"
44+
OUTPUT_VARIABLE HG_REVISION
45+
)
46+
47+
message("* Neo Core revision: ${HG_REVISION}")
48+
49+
IF (PREFIX)
50+
SET(CMAKE_INSTALL_PREFIX ${PREFIX})
51+
ENDIF (PREFIX)
52+
53+
if(CONF_DIR)
54+
55+
else(CONF_DIR)
56+
SET(CONF_DIR ${PREFIX}/etc)
57+
endif(CONF_DIR)
58+
SET(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
59+
60+
message("* Will install to: ${CMAKE_INSTALL_PREFIX}")
61+
message("* With config dir at: ${CONF_DIR}")
62+
message("* Libs install dir at: ${LIBSDIR}")
63+
64+
FIND_LIBRARY(SSLLIB NAMES ssl DOC "SSL library")
65+
FIND_LIBRARY(ZLIB z "Zlib library")
66+
67+
IF(DO_MYSQL)
68+
MESSAGE("* With MySQL")
69+
FIND_MYSQL()
70+
ADD_DEFINITIONS(-DDO_MYSQL)
71+
ENDIF(DO_MYSQL)
72+
73+
if(DO_SCRIPTS)
74+
message("* With Neo Scripts")
75+
SET(SCRIPT_LIB neoscript)
76+
SET(SCRIPT_INCLUDE src/bindings/scripts/include)
77+
ADD_DEFINITIONS(-DDO_SCRIPTS)
78+
else (DO_SCRIPTS)
79+
message("* Without Neo Scripts")
80+
SET(SCRIPT_LIB neointerface)
81+
SET(SCRIPT_INCLUDE src/bindings/interface)
82+
endif(DO_SCRIPTS)
83+
84+
message("-- Miscellaneus options:")
85+
86+
if(DO_CLI)
87+
message("* With CLI")
88+
add_definitions(-DENABLE_CLI)
89+
else (DO_CLI)
90+
message(* Without CLI)
91+
endif(DO_CLI)
92+
93+
if(DO_RA)
94+
message("* With RA")
95+
add_definitions(-DENABLE_RA)
96+
else(DO_RA)
97+
message("* Without RA")
98+
endif(DO_RA)
99+
100+
if(DO_DEBUG)
101+
message("* Debug mode ON")
102+
add_definitions(-g -DNEO_DEBUG)
103+
endif(DO_DEBUG)
104+
105+
if(DO_WARN)
106+
message("* All warnings mode")
107+
add_definitions(-Wall -Wfatal-errors -Wextra)
108+
endif(DO_WARN)
109+
110+
if(LARGE_CELL)
111+
message("* Large cell size")
112+
add_definitions(-DLARGE_CELL)
113+
else(LARGE_CELL)
114+
message("* Small cell size")
115+
endif(LARGE_CELL)
116+
117+
if(SHORT_SLEEP)
118+
message("* System sleep time is 50ms")
119+
add_definitions(-DSHORT_SLEEP)
120+
else(SHORT_SLEEP)
121+
message("* System sleep time is 100ms")
122+
endif(SHORT_SLEEP)
123+
124+
IF(CENTOS)
125+
add_definitions(-DCENTOS)
126+
message("* Building with termcap")
127+
else(CENTOS)
128+
message("* Building with readline")
129+
ENDIF(CENTOS)
130+
131+
FIND_ACE(ACE)
132+
if(ACE_FOUND)
133+
message(STATUS "Found ACE library: ${ACE_LIBRARY}")
134+
message(STATUS "Include dir is: ${ACE_INCLUDE_DIR}")
135+
else(ACE_FOUND)
136+
message(SEND_ERROR "** ACE library not found! NeoCore cannot be compiled!")
137+
message(SEND_ERROR "** Please build ACE from http://www.cs.wustl.edu/~schmidt/ACE.html")
138+
#For now remove msg about install from repo, as ubuntu/debian don't have needed ver in repos.
139+
#message(SEND_ERROR "** your distro may provide a binary for ACE e.g. for ubuntu try apt-get install libace-dev")
140+
return()
141+
#SET(BUILD_ACE 1)
142+
#SET(ACE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/ACE_wrappers ${CMAKE_BINARY_DIR}/dep/ACE_wrappers")
143+
#SET(ACE_LIBRARY ACE)
144+
#message(STATUS "I will try to build ACE from: ${ACE_INCLUDE_DIR}")
145+
#message(STATUS "And link using: ${ACE_LIBRARY}")
146+
endif(ACE_FOUND)
147+
148+
#somehow line below don't work. so for now change it to if exist
149+
#check_include_files(${ACE_INCLUDE_DIR}/ace/Stack_Trace.h HAVE_ACE_STACK_TRACE_H)
150+
IF(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
151+
SET(HAVE_ACE_STACK_TRACE_H 1)
152+
ELSE(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
153+
message(STATUS "** Your libace is out of date. Please update your libace!")
154+
ENDIF(EXISTS ${ACE_INCLUDE_DIR}/ace/Stack_Trace.h)
155+
156+
IF(UNIX AND NOT CENTOS)
157+
FIND_READLINE()
158+
IF(READLINE_FOUND)
159+
message(STATUS "Found Readline library: ${READLINE_LIBRARY}")
160+
message(STATUS "Include dir is: ${READLINE_INCLUDE_DIR}")
161+
ELSE(READLINE_FOUND)
162+
message(SEND_ERROR "** Readline library not found!")
163+
message(SEND_ERROR "** Your distro may provide a binary for Readline e.g. for ubuntu try apt-get install libreadline5-dev")
164+
return()
165+
ENDIF(READLINE_FOUND)
166+
ENDIF(UNIX AND NOT CENTOS)
167+
168+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
169+
170+
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
171+
SET(OSX_LIBS /opt/local/lib/libcrypto.dylib)
172+
add_definitions(-D__ASSERTMACROS__)
173+
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
174+
175+
176+
add_definitions(--no-warnings) #to make build look nice, no gcc nazi warnings.
177+
178+
INCLUDE_DIRECTORIES(
179+
dep/include
180+
dep/include/g3dlite
181+
dep/include/sockets
182+
src/shared
183+
src/framework
184+
src/shared/Database
185+
src/shared/vmap
186+
src/game
187+
src/bindings/scripts/scripts/npc
188+
${CMAKE_BINARY_DIR}
189+
${SCRIPT_INCLUDE}
190+
${MYSQL_INCLUDE_DIR}
191+
${POSTGRESQL_INCLUDE_DIR}
192+
${CMAKE_CURRENT_BINARY_DIR}/src/shared
193+
${CMAKE_CURRENT_SOURCE_DIR}/..
194+
${ACE_INCLUDE_DIR}
195+
${READLINE_INCLUDE_DIR}
196+
)
197+
198+
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
199+
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
200+
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
201+
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
202+
203+
add_subdirectory(dep)
204+
add_subdirectory(doc)
205+
add_subdirectory(src)

0 commit comments

Comments
 (0)