forked from github/server
fixing linux build
This commit is contained in:
parent
e9abfc0f24
commit
ae9ed99cd9
|
@ -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)
|
||||
|
|
2
critbit
2
critbit
|
@ -1 +1 @@
|
|||
Subproject commit 26c635d81a6cf783ccd9d4200d85b4d1327ef200
|
||||
Subproject commit 2a7af5e2347217ea4efcf7fb3f0bc9c2681d1a17
|
|
@ -1 +1 @@
|
|||
Subproject commit fe53382982d0f417b6f7ad0fe08e32393cb07c21
|
||||
Subproject commit f84066fb7d3254bdd9e89694acc4c1c20d001eed
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <kernel/types.h>
|
||||
#include <platform.h>
|
||||
#include <stdlib.h>
|
||||
#include "move.h"
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue