forked from github/server
move bindings into src/ make the code compile from scratch again.
This commit is contained in:
parent
576c963029
commit
bf2bb7449b
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit ddd0136d4e99b0daab16361aad5338ad3ca4b808
|
Subproject commit 923b5e3651c8849fb0769e158447d24646a11cca
|
|
@ -29,12 +29,33 @@ add_subdirectory(util)
|
||||||
add_subdirectory(kernel)
|
add_subdirectory(kernel)
|
||||||
add_subdirectory(items)
|
add_subdirectory(items)
|
||||||
add_subdirectory(attributes)
|
add_subdirectory(attributes)
|
||||||
add_subdirectory(bindings)
|
|
||||||
add_subdirectory(spells)
|
add_subdirectory(spells)
|
||||||
add_subdirectory(triggers)
|
add_subdirectory(triggers)
|
||||||
add_subdirectory(modules)
|
add_subdirectory(modules)
|
||||||
add_subdirectory(races)
|
add_subdirectory(races)
|
||||||
|
|
||||||
|
MACRO(ADD_LUA_MODULE MODULE_NAME FILES)
|
||||||
|
ADD_LIBRARY (${MODULE_NAME} SHARED ${FILES})
|
||||||
|
SET_TARGET_PROPERTIES(${MODULE_NAME}
|
||||||
|
PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
)
|
||||||
|
ENDMACRO(ADD_LUA_MODULE)
|
||||||
|
|
||||||
|
MACRO(TOLUA_BINDING PKGFILE FILES)
|
||||||
|
ADD_CUSTOM_COMMAND(
|
||||||
|
OUTPUT ${PKGFILE}.c
|
||||||
|
DEPENDS ${FILES} ${PKGFILE}
|
||||||
|
COMMAND ${TOLUA_EXECUTABLE}
|
||||||
|
ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/${PKGFILE}.c ${PKGFILE}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
ENDMACRO(TOLUA_BINDING)
|
||||||
|
|
||||||
|
TOLUA_BINDING(process.pkg bind_process.h)
|
||||||
|
TOLUA_BINDING(eressea.pkg bind_eressea.h)
|
||||||
|
TOLUA_BINDING(settings.pkg bind_settings.h)
|
||||||
|
|
||||||
set(TESTS
|
set(TESTS
|
||||||
laws_test.c
|
laws_test.c
|
||||||
economy_test.c
|
economy_test.c
|
||||||
|
@ -42,6 +63,9 @@ set(TESTS
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SERVER_SRC
|
set (SERVER_SRC
|
||||||
|
process.pkg.c
|
||||||
|
eressea.pkg.c
|
||||||
|
settings.pkg.c
|
||||||
eressea.c
|
eressea.c
|
||||||
archetype.c
|
archetype.c
|
||||||
creation.c
|
creation.c
|
||||||
|
@ -60,7 +84,22 @@ set (SERVER_SRC
|
||||||
xmlreport.c
|
xmlreport.c
|
||||||
gmtool.c
|
gmtool.c
|
||||||
monsters.c
|
monsters.c
|
||||||
${BINDINGS_SRC}
|
bind_building.c
|
||||||
|
bind_eressea.c
|
||||||
|
bind_faction.c
|
||||||
|
bind_gmtool.c
|
||||||
|
bind_hashtable.c
|
||||||
|
bindings.c
|
||||||
|
helpers.c
|
||||||
|
bind_message.c
|
||||||
|
bind_monsters.c
|
||||||
|
bind_process.c
|
||||||
|
bind_region.c
|
||||||
|
bind_settings.c
|
||||||
|
bind_ship.c
|
||||||
|
bind_sqlite.c
|
||||||
|
bind_storage.c
|
||||||
|
bind_unit.c
|
||||||
${SPELLS_SRC}
|
${SPELLS_SRC}
|
||||||
${RACES_SRC}
|
${RACES_SRC}
|
||||||
${ITEMS_SRC}
|
${ITEMS_SRC}
|
||||||
|
|
|
@ -23,7 +23,8 @@ without prior permission by the authors of Eressea.
|
||||||
#include <util/attrib.h>
|
#include <util/attrib.h>
|
||||||
#include <util/log.h>
|
#include <util/log.h>
|
||||||
#include <util/resolve.h>
|
#include <util/resolve.h>
|
||||||
#include <util/storage.h>
|
|
||||||
|
#include <storage.h>
|
||||||
|
|
||||||
/* external libraries */
|
/* external libraries */
|
||||||
#include <bson.h>
|
#include <bson.h>
|
|
@ -1,51 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
|
||||||
project (bindings C)
|
|
||||||
|
|
||||||
MACRO(ADD_LUA_MODULE MODULE_NAME FILES)
|
|
||||||
ADD_LIBRARY (${MODULE_NAME} SHARED ${FILES})
|
|
||||||
SET_TARGET_PROPERTIES(${MODULE_NAME}
|
|
||||||
PROPERTIES
|
|
||||||
PREFIX ""
|
|
||||||
)
|
|
||||||
ENDMACRO(ADD_LUA_MODULE)
|
|
||||||
|
|
||||||
MACRO(TOLUA_BINDING PKGFILE FILES)
|
|
||||||
ADD_CUSTOM_COMMAND(
|
|
||||||
OUTPUT ${PKGFILE}.c
|
|
||||||
DEPENDS ${FILES} ${PKGFILE}
|
|
||||||
COMMAND ${TOLUA_EXECUTABLE}
|
|
||||||
ARGS -o ${CMAKE_CURRENT_BINARY_DIR}/${PKGFILE}.c ${PKGFILE}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
ENDMACRO(TOLUA_BINDING)
|
|
||||||
|
|
||||||
TOLUA_BINDING(process.pkg bind_process.h)
|
|
||||||
TOLUA_BINDING(eressea.pkg bind_eressea.h)
|
|
||||||
TOLUA_BINDING(settings.pkg bind_settings.h)
|
|
||||||
|
|
||||||
set (_FILES
|
|
||||||
process.pkg.c
|
|
||||||
eressea.pkg.c
|
|
||||||
settings.pkg.c
|
|
||||||
bind_process.c
|
|
||||||
bind_eressea.c
|
|
||||||
bind_settings.c
|
|
||||||
bind_building.c
|
|
||||||
bind_faction.c
|
|
||||||
bind_gmtool.c
|
|
||||||
bind_hashtable.c
|
|
||||||
bindings.c
|
|
||||||
bind_message.c
|
|
||||||
bind_monsters.c
|
|
||||||
bind_region.c
|
|
||||||
bind_ship.c
|
|
||||||
bind_sqlite.c
|
|
||||||
bind_storage.c
|
|
||||||
bind_unit.c
|
|
||||||
helpers.c
|
|
||||||
)
|
|
||||||
|
|
||||||
FOREACH(_FILE ${_FILES})
|
|
||||||
LIST(APPEND _SOURCES ${PROJECT_NAME}/${_FILE})
|
|
||||||
ENDFOREACH(_FILE)
|
|
||||||
SET(BINDINGS_SRC ${_SOURCES} PARENT_SCOPE)
|
|
|
@ -26,7 +26,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "eressea.h"
|
#include "eressea.h"
|
||||||
#include "gmtool.h"
|
#include "gmtool.h"
|
||||||
|
|
||||||
#include "bindings/bindings.h"
|
#include "bindings.h"
|
||||||
#include "races/races.h"
|
#include "races/races.h"
|
||||||
#include "spells/spells.h"
|
#include "spells/spells.h"
|
||||||
#include "spells/borders.h"
|
#include "spells/borders.h"
|
||||||
|
|
Loading…
Reference in New Issue