fixing linux build

This commit is contained in:
Enno Rehling 2014-08-29 07:47:47 +02:00
parent e9abfc0f24
commit ae9ed99cd9
8 changed files with 23 additions and 16 deletions

View File

@ -54,18 +54,6 @@ CONFIGURE_FILE (
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/include)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AUTOCONF")
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
elseif(MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG
"${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE
"${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
ELSE(CMAKE_COMPILER_IS_GNUCC)
MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
find_package (LibXml2)
find_package (SQLite3)

@ -1 +1 @@
Subproject commit 26c635d81a6cf783ccd9d4200d85b4d1327ef200
Subproject commit 2a7af5e2347217ea4efcf7fb3f0bc9c2681d1a17

@ -1 +1 @@
Subproject commit fe53382982d0f417b6f7ad0fe08e32393cb07c21
Subproject commit f84066fb7d3254bdd9e89694acc4c1c20d001eed

View File

@ -12,6 +12,19 @@ include_directories (${LUA_INCLUDE_DIR})
include_directories (${BSON_INCLUDE_DIR})
include_directories (${INIPARSER_INCLUDE_DIR})
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
elseif(MSVC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG
"${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE
"${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
ELSE(CMAKE_COMPILER_IS_GNUCC)
MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
add_subdirectory(util)
add_subdirectory(kernel)
add_subdirectory(items)
@ -142,6 +155,7 @@ set(TESTS_SRC
test_eressea.c
tests.c
battle.test.c
vortex.test.c
tests.test.c
reports.test.c
stealth.test.c

View File

@ -11,6 +11,7 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bind_ship.h"
#include "bind_unit.h"

View File

@ -11,6 +11,7 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bindings.h"
#include "bind_unit.h"
#include "bind_storage.h"

View File

@ -1,3 +1,4 @@
#include <kernel/types.h>
#include <platform.h>
#include <stdlib.h>
#include "move.h"

View File

@ -15,6 +15,8 @@
#include <storage.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
typedef struct dir_lookup {
char *name;
@ -77,7 +79,7 @@ static int a_readdirection(attrib * a, void *owner, struct storage *store)
{
spec_direction *d = (spec_direction *)(a->data.v);
_CRT_UNUSED(owner);
(void) owner;
READ_INT(store, &d->x);
READ_INT(store, &d->y);
READ_INT(store, &d->duration);
@ -118,7 +120,7 @@ a_writedirection(const attrib * a, const void *owner, struct storage *store)
{
spec_direction *d = (spec_direction *)(a->data.v);
_CRT_UNUSED(owner);
(void)owner;
WRITE_INT(store, d->x);
WRITE_INT(store, d->y);
WRITE_INT(store, d->duration);