|
|
@@ -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 <p.janouch@gmail.com>") |