From d2e62bc80dc20efd4d9eb68ae364d9c8fa4dc774 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sat, 11 Apr 2015 21:05:13 +0200 Subject: Add a stubbed IRC client --- CMakeLists.txt | 21 ++++++++++++++++++--- README | 8 +++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 931cb6d..b665740 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,10 @@ set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}") set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}") # Dependencies +find_package (Curses) find_package (PkgConfig REQUIRED) pkg_check_modules (libssl REQUIRED libssl libcrypto) +pkg_check_modules (ncursesw ncursesw) # -lpthread is only there for debugging (gdb & errno) # -lrt is only for glibc < 2.17 @@ -26,6 +28,16 @@ list (APPEND project_libraries ${libssl_LIBRARIES} rt pthread) include_directories (${libssl_INCLUDE_DIRS}) link_directories (${libssl_LIBRARY_DIRS}) +if (ncursesw_FOUND) + list (APPEND project_libraries ${ncursesw_LIBRARIES}) + include_directories (${ncursesw_INCLUDE_DIRS}) +elseif (CURSES_FOUND) + list (APPEND project_libraries ${CURSES_LIBRARY}) + include_directories (${CURSES_INCLUDE_DIR}) +else (CURSES_FOUND) + message (SEND_ERROR "Curses not found") +endif (ncursesw_FOUND) + # Generate a configuration file include (GNUInstallDirs) set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}) @@ -48,11 +60,14 @@ set_source_files_properties (${PROJECT_BINARY_DIR}/kike-replies.c add_executable (zyklonb zyklonb.c ${common_sources} ${common_headers}) target_link_libraries (zyklonb ${project_libraries}) +add_executable (degesch degesch.c ${common_sources} ${common_headers}) +target_link_libraries (degesch ${project_libraries} readline) + add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers}) target_link_libraries (kike ${project_libraries}) # Installation -install (TARGETS zyklonb kike DESTINATION ${CMAKE_INSTALL_BINDIR}) +install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) foreach (plugin coin eval script youtube ${plugins}) @@ -65,7 +80,7 @@ if (NOT HELP2MAN_EXECUTABLE) message (FATAL_ERROR "help2man not found") endif (NOT HELP2MAN_EXECUTABLE) -foreach (page zyklonb kike) +foreach (page zyklonb degesch kike) set (page_output "${PROJECT_BINARY_DIR}/${page}.1") list (APPEND project_MAN_PAGES "${page_output}") add_custom_command (OUTPUT ${page_output} @@ -84,7 +99,7 @@ foreach (page ${project_MAN_PAGES}) endforeach (page) # CPack -set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Experimental IRC bot & daemon") +set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Experimental IRC bot, client and daemon") set (CPACK_PACKAGE_VERSION ${project_VERSION}) set (CPACK_PACKAGE_VENDOR "Premysl Janouch") set (CPACK_PACKAGE_CONTACT "Přemysl Janouch ") diff --git a/README b/README index 7563a8b..c95d451 100644 --- a/README +++ b/README @@ -26,10 +26,16 @@ Some interesting features: - epoll support on Linux - superfast build time, small memory footprint +degesch +------- +To complete it all, I've also started working on an IRC client. I thought it +would be interesting to build an IRC client on top of libreadline. Also way +simpler than doing it in ncurses. + Building -------- Build dependencies: CMake, pkg-config, help2man, awk, sh, liberty (included) -Runtime dependencies: openssl +Runtime dependencies: openssl, ncursesw (degesch), readline (degesch) $ git clone https://github.com/pjanouch/ZyklonB.git $ git submodule init -- cgit v1.2.3-70-g09d2