build: USE_BUNDLED_UNIBILIUM=0 fails #36623

build: guard unibilium.h with HAVE_UNIBILIUM

Problem:

    make distclean
    make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DENABLE_UNIBILIUM=0" BUNDLED_CMAKE_FLAG="-DUSE_BUNDLED_UNIBILIUM=0"
    sudo make install

    In file included from …/nvim/tui/input.h:10:
    …/nvim/tui/termkey/termkey_defs.h:5:10: fatal error: 'unibilium.h' file not found
        5 | #include <unibilium.h>
          |          ^~~~~~~~~~~~~
    1 error generated.
    make[3]: *** [src/nvim/CMakeFiles/nvim_bin.dir/tui/input.c.o] Error 1
    make[2]: *** [src/nvim/CMakeFiles/nvim_bin.dir/all] Error 2
    make[1]: *** [all] Error 2
    make: *** [nvim] Error 2

Solution:
Check HAVE_UNIBILIUM.
This commit is contained in:
Justin M. Keyes
2025-11-19 14:35:32 -08:00
committed by GitHub
parent 7c2d4df2d3
commit 4f97239661

View File

@@ -2,7 +2,11 @@
#include <stddef.h>
#include <stdint.h>
#include <unibilium.h>
#ifdef HAVE_UNIBILIUM
# include <unibilium.h>
#endif
#include <uv.h>
#include "nvim/event/defs.h"