summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 72b52436c..55f5d4ad8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -160,6 +160,20 @@ find_package(Lua REQUIRED)
find_package(GMP REQUIRED)
+option(ENABLE_CURSES "Enable ncurses console" TRUE)
+set(USE_CURSES FALSE)
+
+if(ENABLE_CURSES)
+ find_package(Ncursesw)
+ if(CURSES_FOUND)
+ set(USE_CURSES TRUE)
+ message(STATUS "ncurses console enabled.")
+ include_directories(${CURSES_INCLUDE_DIRS})
+ else()
+ message(STATUS "ncurses not found!")
+ endif()
+endif(ENABLE_CURSES)
+
option(ENABLE_LEVELDB "Enable LevelDB backend" TRUE)
set(USE_LEVELDB FALSE)
@@ -322,6 +336,7 @@ set(common_SRCS
areastore.cpp
ban.cpp
cavegen.cpp
+ chat.cpp
clientiface.cpp
collision.cpp
content_abm.cpp
@@ -387,6 +402,7 @@ set(common_SRCS
sound.cpp
staticobject.cpp
subgame.cpp
+ terminal_chat_console.cpp
tool.cpp
treegen.cpp
version.cpp
@@ -431,7 +447,6 @@ set(client_SRCS
${sound_SRCS}
${client_network_SRCS}
camera.cpp
- chat.cpp
client.cpp
clientmap.cpp
clientmedia.cpp
@@ -558,6 +573,9 @@ if(BUILD_CLIENT)
${CGUITTFONT_LIBRARY}
)
endif()
+ if (USE_CURSES)
+ target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARIES})
+ endif()
if (USE_LEVELDB)
target_link_libraries(${PROJECT_NAME} ${LEVELDB_LIBRARY})
endif()
@@ -585,6 +603,9 @@ if(BUILD_SERVER)
)
set_target_properties(${PROJECT_NAME}server PROPERTIES
COMPILE_DEFINITIONS "SERVER")
+ if (USE_CURSES)
+ target_link_libraries(${PROJECT_NAME}server ${CURSES_LIBRARIES})
+ endif()
if (USE_LEVELDB)
target_link_libraries(${PROJECT_NAME}server ${LEVELDB_LIBRARY})
endif()