From 130bfe22c8b2e1ccbb7b1f07a1653386460aa569 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:46:10 +0100 Subject: [PATCH] ci: disable libintl on mac release The releases doesn't work on intel mac as libintl isn't available on the system by default. This makes `:language` not work for the shipped macos releases, though the reduction in build system complexity most likely outweighs that. --- .github/scripts/build_universal_macos.sh | 1 + CMakeLists.txt | 1 + src/nvim/CMakeLists.txt | 12 +++++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh index d07c395cd6..432a275d6d 100755 --- a/.github/scripts/build_universal_macos.sh +++ b/.github/scripts/build_universal_macos.sh @@ -12,6 +12,7 @@ cmake -B build -G Ninja \ -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ + -D ENABLE_LIBINTL=OFF \ -D CMAKE_FIND_FRAMEWORK=NEVER cmake --build build # Make sure we build everything for M1 as well diff --git a/CMakeLists.txt b/CMakeLists.txt index aa9ae8b875..15e3f34edd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,7 @@ if (MINGW) else() option(ENABLE_LTO "enable link time optimization" ON) endif() +option(ENABLE_LIBINTL "enable libintl" ON) message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 069ef8a8ef..75c9821a2c 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -32,11 +32,13 @@ target_link_libraries(main_lib INTERFACE treesitter unibilium) -# Libintl (not Intl) selects our FindLibintl.cmake script. #8464 -find_package(Libintl REQUIRED) -target_include_directories(main_lib SYSTEM BEFORE INTERFACE ${LIBINTL_INCLUDE_DIR}) -if (LIBINTL_LIBRARY) - target_link_libraries(main_lib INTERFACE ${LIBINTL_LIBRARY}) +if(ENABLE_LIBINTL) + # Libintl (not Intl) selects our FindLibintl.cmake script. #8464 + find_package(Libintl REQUIRED) + target_include_directories(main_lib SYSTEM BEFORE INTERFACE ${LIBINTL_INCLUDE_DIR}) + if (LIBINTL_LIBRARY) + target_link_libraries(main_lib INTERFACE ${LIBINTL_LIBRARY}) + endif() endif() # The unit test lib requires LuaJIT; it will be skipped if LuaJIT is missing.