1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

cmake: plugins: simplify dependency handling

Move the requirement checks within the respective plugin cmakefile.
Use REQUIRED instead of the manual FOUND check and error handling.

Note: the tcl check was only moved, since using REQUIRED  explodes in
CI.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov
2025-09-14 15:26:16 +01:00
committed by Sébastien Helleu
parent 440907e1cd
commit a413d16038
12 changed files with 99 additions and 149 deletions
+5 -5
View File
@@ -20,16 +20,16 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
find_package(Lua REQUIRED)
add_library(lua MODULE
weechat-lua.c weechat-lua.h
weechat-lua-api.c weechat-lua-api.h
)
set_target_properties(lua PROPERTIES PREFIX "")
if(LUA_FOUND)
add_definitions(${LUA_CFLAGS})
include_directories(${LUA_INCLUDE_DIRS})
target_link_libraries(lua ${LUA_LDFLAGS} weechat_plugins_scripts coverage_config)
endif()
add_definitions(${LUA_CFLAGS})
include_directories(${LUA_INCLUDE_DIRS})
target_link_libraries(lua ${LUA_LDFLAGS} weechat_plugins_scripts coverage_config)
install(TARGETS lua LIBRARY DESTINATION "${WEECHAT_LIBDIR}/plugins")