core: display an error on missing dependency in CMake (closes #916, closes #956)

v2.8-utf8proc
Sébastien Helleu 2019-09-15 07:49:03 +02:00
parent 9cb6857672
commit bff40e4c26
5 changed files with 43 additions and 18 deletions

View File

@ -180,6 +180,8 @@ if(ENABLE_NLS)
find_package(Gettext)
if(GETTEXT_FOUND)
add_definitions(-DENABLE_NLS)
else()
message(SEND_ERROR "Gettext not found")
endif()
endif()
@ -197,6 +199,8 @@ if(ENABLE_GNUTLS)
include_directories(${GNUTLS_INCLUDE_PATH})
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${GNUTLS_LIBRARY_PATH}")
list(APPEND EXTRA_LIBS gnutls)
else()
message(SEND_ERROR "GnuTLS not found")
endif()
endif()
@ -234,10 +238,14 @@ endif()
add_subdirectory(src)
add_subdirectory(doc)
find_package(CppUTest)
if(ENABLE_TESTS AND CPPUTEST_FOUND)
enable_testing()
add_subdirectory(tests)
if(ENABLE_TESTS)
find_package(CppUTest)
if(CPPUTEST_FOUND)
enable_testing()
add_subdirectory(tests)
else()
message(SEND_ERROR "CppUTest not found")
endif()
endif()
configure_file(config.h.cmake config.h @ONLY)

View File

@ -15,6 +15,12 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
(file _ReleaseNotes.adoc_ in sources).
[[v2.7]]
== Version 2.7 (under dev)
Build::
* core: display an error on missing dependency in CMake (issue #916, issue #956)
[[v2.6]]
== Version 2.6 (2019-09-08)

View File

@ -19,13 +19,9 @@
#
if(ENABLE_MAN OR ENABLE_DOC)
find_package(Asciidoctor)
if(ASCIIDOCTOR_FOUND)
set(ASCIIDOCTOR_ARGS -a experimental -a icons=font -a revnumber="${VERSION}" -a sectanchors -a source-highlighter=prettify)
add_subdirectory(cs)
add_subdirectory(de)
add_subdirectory(en)
@ -35,7 +31,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
add_subdirectory(ja)
add_subdirectory(pl)
add_subdirectory(ru)
else()
message(SEND_ERROR "Asciidoctor not found")
endif()
endif()

View File

@ -40,6 +40,8 @@ if(NCURSES_FOUND)
add_definitions(-DHAVE_NCURSES_H)
endif()
endif()
else()
message(SEND_ERROR "Ncurses not found")
endif()
include_directories(.. ../../core ../../plugins ${NCURSES_INCLUDE_PATH})

View File

@ -55,9 +55,10 @@ if(ENABLE_BUFLIST)
endif()
if(ENABLE_CHARSET)
# Check for iconv support.
if(ICONV_FOUND)
add_subdirectory(charset)
else()
message(SEND_ERROR "Iconv not found")
endif()
endif()
@ -93,6 +94,8 @@ if(ENABLE_SCRIPTS AND ENABLE_PERL)
find_package(Perl)
if(PERL_FOUND)
add_subdirectory(perl)
else()
message(SEND_ERROR "Perl not found")
endif()
endif()
@ -100,6 +103,8 @@ if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
find_package(Python)
if(PYTHON_FOUND)
add_subdirectory(python)
else()
message(SEND_ERROR "Python not found")
endif()
endif()
@ -107,6 +112,8 @@ if(ENABLE_SCRIPTS AND ENABLE_RUBY)
find_package(Ruby)
if(RUBY_FOUND)
add_subdirectory(ruby)
else()
message(SEND_ERROR "Ruby not found")
endif()
endif()
@ -114,6 +121,8 @@ if(ENABLE_SCRIPTS AND ENABLE_LUA)
find_package(Lua)
if(LUA_FOUND)
add_subdirectory(lua)
else()
message(SEND_ERROR "Lua not found")
endif()
endif()
@ -121,6 +130,8 @@ if(ENABLE_SCRIPTS AND ENABLE_TCL)
find_package(TCL)
if(TCL_FOUND)
add_subdirectory(tcl)
else()
message(SEND_ERROR "Tcl not found")
endif()
endif()
@ -128,6 +139,8 @@ if(ENABLE_SCRIPTS AND ENABLE_GUILE)
find_package(Guile)
if(GUILE_FOUND)
add_subdirectory(guile)
else()
message(SEND_ERROR "Guile not found")
endif()
endif()
@ -135,6 +148,8 @@ if(ENABLE_SCRIPTS AND ENABLE_JAVASCRIPT)
find_package(V8)
if(V8_FOUND)
add_subdirectory(javascript)
else()
message(SEND_ERROR "V8 (javascript) not found")
endif()
endif()
@ -142,27 +157,25 @@ if(ENABLE_SCRIPTS AND ENABLE_PHP)
find_package(PHP)
if(PHP_FOUND)
add_subdirectory(php)
else()
message(SEND_ERROR "Php not found")
endif()
endif()
if(ENABLE_SPELL)
if(ENABLE_ENCHANT)
# Check for enchant libraries
find_package(ENCHANT)
if(ENCHANT_FOUND)
add_subdirectory(spell)
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(spell)
endif()
message(SEND_ERROR "Enchant not found")
endif()
else()
# Check for aspell libraries
find_package(Aspell)
if(ASPELL_FOUND)
add_subdirectory(spell)
else()
message(SEND_ERROR "Aspell not found")
endif()
endif()
endif()