Skip to content
Browse files

Added ncurses library to CMakeLists.txt build dependencies to compile…

… fine with cmake.
  • Loading branch information...
1 parent 9f0a349 commit d25fc52160d3d25fd449c91e99ce954d0408a161 @bakkdoor bakkdoor committed Dec 13, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 CMakeLists.txt
View
12 CMakeLists.txt
@@ -74,6 +74,16 @@ if(NOISE_INCLUDE_DIR MATCHES ".*libnoise$")
add_definitions(-DDEBIAN)
endif()
+find_library(NCURSES_LIBRARY
+ NAMES libncurses.so
+ PATHS /usr/lib /usr/local/lib
+)
+find_path(NCURSES_INCLUDE_DIR
+ NAMES ncurses.h
+ PATHS /usr/include /usr/local/include
+)
+
+
if (WINDOWS)
# even if 64bit this is set
set(exe "WIN32")
@@ -84,13 +94,15 @@ if (NOT dependency_error)
# include_directories(${LUA_INCLUDE_DIR})
include_directories(${EVENT_INCLUDE_DIR})
include_directories(${NOISE_INCLUDE_DIR})
+ include_directories(${NCURSES_INCLUDE_DIR})
add_executable(mineserver ${exe} ${folder_source})
target_link_libraries(mineserver ${ZLIB_LIBRARY})
# target_link_libraries(mineserver ${LUA_LIBRARY})
target_link_libraries(mineserver ${EVENT_LIBRARY})
target_link_libraries(mineserver ${NOISE_LIBRARY})
+ target_link_libraries(mineserver ${NCURSES_LIBRARY})
else()
message(FATAL_ERROR "\n\tNot all dependencies could be found:\n${errors}\n After installing them please rerun cmake.\n")
endif()

0 comments on commit d25fc52

Please sign in to comment.
Something went wrong with that request. Please try again.