Skip to content
Permalink
Browse files

core: display an error on missing dependency in CMake (closes #916, c…

…loses #956)
  • Loading branch information...
flashcode committed Sep 15, 2019
1 parent 9cb6857 commit bff40e4c26817a129ae020c5bc4e51fd5d8476f0
Showing with 43 additions and 18 deletions.
  1. +12 −4 CMakeLists.txt
  2. +6 −0 ChangeLog.adoc
  3. +2 −6 doc/CMakeLists.txt
  4. +2 −0 src/gui/curses/normal/CMakeLists.txt
  5. +21 −8 src/plugins/CMakeLists.txt
@@ -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)
@@ -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)

@@ -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()
@@ -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})
@@ -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,76 +94,88 @@ if(ENABLE_SCRIPTS AND ENABLE_PERL)
find_package(Perl)
if(PERL_FOUND)
add_subdirectory(perl)
else()
message(SEND_ERROR "Perl not found")
endif()
endif()

if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
find_package(Python)
if(PYTHON_FOUND)
add_subdirectory(python)
else()
message(SEND_ERROR "Python not found")
endif()
endif()

if(ENABLE_SCRIPTS AND ENABLE_RUBY)
find_package(Ruby)
if(RUBY_FOUND)
add_subdirectory(ruby)
else()
message(SEND_ERROR "Ruby not found")
endif()
endif()

if(ENABLE_SCRIPTS AND ENABLE_LUA)
find_package(Lua)
if(LUA_FOUND)
add_subdirectory(lua)
else()
message(SEND_ERROR "Lua not found")
endif()
endif()

if(ENABLE_SCRIPTS AND ENABLE_TCL)
find_package(TCL)
if(TCL_FOUND)
add_subdirectory(tcl)
else()
message(SEND_ERROR "Tcl not found")
endif()
endif()

if(ENABLE_SCRIPTS AND ENABLE_GUILE)
find_package(Guile)
if(GUILE_FOUND)
add_subdirectory(guile)
else()
message(SEND_ERROR "Guile not found")
endif()
endif()

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()

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()

0 comments on commit bff40e4

Please sign in to comment.
You can’t perform that action at this time.