cmake files for uil and kernel

fixing a bunch of files that do not compile on their own
This commit is contained in:
Enno Rehling 2012-06-03 12:51:35 -07:00
parent ee456c49b1
commit 5cba331ad3
8 changed files with 81 additions and 7 deletions

View File

@ -7,3 +7,4 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../../cmake/Modu
add_subdirectory (../../dependencies "${CMAKE_CURRENT_BINARY_DIR}/dependencies") add_subdirectory (../../dependencies "${CMAKE_CURRENT_BINARY_DIR}/dependencies")
add_subdirectory (util) add_subdirectory (util)
add_subdirectory (kernel)

71
src/kernel/CMakeLists.txt Normal file
View File

@ -0,0 +1,71 @@
cmake_minimum_required (VERSION 2.4)
project (kernel)
#find_package (Lua51 REQUIRED)
#find_package (LibXml2 REQUIRED)
#find_package (CuTest REQUIRED HINTS ${DEPENDENCIES_DIR})
#find_package (QuickList REQUIRED)
#find_package (CritBit REQUIRED)
include_directories (..)
#include_directories (${LUA_INCLUDE_DIR})
include_directories (${LIBXML2_INCLUDE_DIR})
include_directories (${CRITBIT_INCLUDE_DIR})
include_directories (${QUICKLIST_INCLUDE_DIR})
include_directories (${CUTEST_INCLUDE_DIR})
include_directories (${INIPARSER_INCLUDE_DIR})
include_directories (${CRYPTO_INCLUDE_DIR})
add_library (kernel
alchemy.c
alliance.c
battle.c
battle_test.c
binarystore.c
build.c
building.c
building_test.c
calendar.c
command.c
config.c
connection.c
curse.c
curse_test.c
equipment.c
equipment_test.c
faction.c
group.c
item.c
item_test.c
magic.c
magic_test.c
message.c
move.c
move_test.c
names.c
order.c
pathfinder.c
plane.c
player.c
pool.c
pool_test.c
race.c
region.c
reports.c
reports_test.c
resources.c
save.c
ship.c
ship_test.c
skill.c
spellbook.c
spellbook_test.c
spell.c
spell_test.c
sqlite.c
teleport.c
terrain.c
textstore.c
unit.c
xmlreader.c
)

View File

@ -83,7 +83,7 @@ void equipment_setskill(equipment * eq, skill_t sk, const char *value)
} }
} }
void equipment_addspell(equipment * eq, spell * sp, int level) void equipment_addspell(equipment * eq, struct spell * sp, int level)
{ {
if (eq) { if (eq) {
if (!eq->spellbook) { if (!eq->spellbook) {

View File

@ -24,6 +24,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "alchemy.h" #include "alchemy.h"
#include "build.h" #include "build.h"
#include "curse.h"
#include "faction.h" #include "faction.h"
#include "message.h" #include "message.h"
#include "pool.h" #include "pool.h"

View File

@ -22,11 +22,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern "C" { extern "C" {
#endif #endif
#include "curse.h"
struct fighter;
struct building;
struct spellbook;
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
#define MAXCOMBATSPELLS 3 /* PRECOMBAT COMBAT POSTCOMBAT */ #define MAXCOMBATSPELLS 3 /* PRECOMBAT COMBAT POSTCOMBAT */

View File

@ -1,9 +1,11 @@
#include <platform.h> #include <platform.h>
#include <kernel/types.h>
#include "pool.h" #include "pool.h"
#include "unit.h" #include "unit.h"
#include "item.h" #include "item.h"
#include "region.h" #include "region.h"
#include "skill.h"
#include <CuTest.h> #include <CuTest.h>
#include <tests.h> #include <tests.h>

View File

@ -38,6 +38,7 @@ struct attrib_type;
struct building; struct building;
struct building_type; struct building_type;
struct curse; struct curse;
struct curse_type;
struct equipment; struct equipment;
struct faction; struct faction;
struct fighter; struct fighter;
@ -48,6 +49,7 @@ struct luxury_type;
struct order; struct order;
struct plane; struct plane;
struct potion_type; struct potion_type;
struct quicklist;
struct race; struct race;
struct region; struct region;
struct region_list; struct region_list;

View File

@ -18,12 +18,14 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <platform.h> #include <platform.h>
#include <kernel/config.h> #include <kernel/config.h>
#include <kernel/types.h>
#include "unit.h" #include "unit.h"
#include "building.h" #include "building.h"
#include "faction.h" #include "faction.h"
#include "group.h" #include "group.h"
#include "connection.h" #include "connection.h"
#include "curse.h"
#include "item.h" #include "item.h"
#include "move.h" #include "move.h"
#include "order.h" #include "order.h"