1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06: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
@@ -19,16 +19,16 @@
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
#
find_package(PHP REQUIRED)
add_library(php MODULE
weechat-php.c weechat-php.h
weechat-php-api.c weechat-php-api.h
)
set_target_properties(php PROPERTIES PREFIX "")
if(PHP_FOUND)
include_directories(${PHP_INCLUDE_DIRS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PHP_LDFLAGS}")
target_link_libraries(php ${PHP_LIB} weechat_plugins_scripts coverage_config)
endif()
include_directories(${PHP_INCLUDE_DIRS})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PHP_LDFLAGS}")
target_link_libraries(php ${PHP_LIB} weechat_plugins_scripts coverage_config)
install(TARGETS php LIBRARY DESTINATION "${WEECHAT_LIBDIR}/plugins")