Merge pull request #102 from badgerman/master

improve project build times by making server and unit tests share a library
This commit is contained in:
Enno Rehling 2015-01-10 18:02:37 +01:00
commit b6ff715e54
3 changed files with 11 additions and 8 deletions

View File

@ -126,25 +126,27 @@ set(SERVER_SRC
bind_ship.c bind_ship.c
bind_storage.c bind_storage.c
bind_unit.c bind_unit.c
${ERESSEA_SRC}) )
if (SQLITE3_FOUND) if (SQLITE3_FOUND)
set (SERVER_SRC set (SERVER_SRC ${SERVER_SRC}
sqlite.c sqlite.c
bind_sqlite.c bind_sqlite.c
${SERVER_SRC}) )
endif (SQLITE3_FOUND) endif (SQLITE3_FOUND)
if (CURSES_FOUND) if (CURSES_FOUND)
set (SERVER_SRC set (SERVER_SRC ${SERVER_SRC}
gmtool.c gmtool.c
listbox.c listbox.c
bind_gmtool.c bind_gmtool.c
${SERVER_SRC}) )
endif(CURSES_FOUND) endif(CURSES_FOUND)
add_library(game ${ERESSEA_SRC})
add_executable(eressea ${SERVER_SRC}) add_executable(eressea ${SERVER_SRC})
target_link_libraries(eressea target_link_libraries(eressea
game
${TOLUA_LIBRARIES} ${TOLUA_LIBRARIES}
${LUA_LIBRARIES} ${LUA_LIBRARIES}
${QUICKLIST_LIBRARIES} ${QUICKLIST_LIBRARIES}
@ -178,12 +180,12 @@ set(TESTS_SRC
${ATTRIBUTES_TESTS} ${ATTRIBUTES_TESTS}
${UTIL_TESTS} ${UTIL_TESTS}
${KERNEL_TESTS} ${KERNEL_TESTS}
${ERESSEA_SRC}
) )
add_executable(test_eressea ${TESTS_SRC}) add_executable(test_eressea ${TESTS_SRC})
target_link_libraries(test_eressea ${CUTEST_LIBRARIES})
target_link_libraries(test_eressea target_link_libraries(test_eressea
game
${CUTEST_LIBRARIES}
${LUA_LIBRARIES} ${LUA_LIBRARIES}
${QUICKLIST_LIBRARIES} ${QUICKLIST_LIBRARIES}
${STORAGE_LIBRARIES} ${STORAGE_LIBRARIES}

View File

@ -275,7 +275,7 @@ static const char *dragon_name(const unit * u)
if (anzahl > 1) { if (anzahl > 1) {
const char *no_article = strchr((const char *)str, ' '); const char *no_article = strchr((const char *)str, ' ');
assert(no_article); assert(no_article);
/* TODO: GERMAN */ // TODO: localization
sprintf(name, "Die %sn von %s", no_article + 1, rname(u->region, sprintf(name, "Die %sn von %s", no_article + 1, rname(u->region,
default_locale)); default_locale));
} }

View File

@ -1100,6 +1100,7 @@ static void describe(FILE * F, const seen_region * sr, faction * f)
if (rule_region_owners()) { if (rule_region_owners()) {
const faction *owner = region_get_owner(r); const faction *owner = region_get_owner(r);
if (owner != NULL) { if (owner != NULL) {
// TODO: localization
bytes = _snprintf(bufp, size, " Die Region ist im Besitz von %s.", bytes = _snprintf(bufp, size, " Die Region ist im Besitz von %s.",
factionname(owner)); factionname(owner));
if (wrptr(&bufp, &size, bytes) != 0) if (wrptr(&bufp, &size, bytes) != 0)