From 2ca5a859e9f5148a09928803cc2d109440a8067c Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Sun, 28 Nov 2021 11:07:19 +0100 Subject: [PATCH] Force static libncurses in CMakeLists when static zig on macos Add additional search paths pointing at homebrew prefixes as Apple doesn't ship a static libncurses for linking - only a stub for dynamic linking `libncurses.tbd`. --- CMakeLists.txt | 5 ++++- ci/azure/macos_arm64_script | 2 +- ci/azure/macos_script | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e2614a7c9..f9800b4e9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,10 @@ endif() if(APPLE AND ZIG_STATIC) list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses") - find_library(CURSES NAMES libcurses.a curses libcurses libncurses.a ncurses libncurses) + find_library(CURSES NAMES libcurses.a libncurses.a + PATHS + /usr/local/opt/ncurses/lib + /opt/homebrew/opt/ncurses/lib) list(APPEND LLVM_LIBRARIES "${CURSES}") endif() diff --git a/ci/azure/macos_arm64_script b/ci/azure/macos_arm64_script index fc9fc2f954..b8d1437e78 100755 --- a/ci/azure/macos_arm64_script +++ b/ci/azure/macos_arm64_script @@ -3,7 +3,7 @@ set -x set -e -brew update && brew install s3cmd +brew update && brew install ncurses s3cmd ZIGDIR="$(pwd)" diff --git a/ci/azure/macos_script b/ci/azure/macos_script index b320d4f21b..da0e279500 100755 --- a/ci/azure/macos_script +++ b/ci/azure/macos_script @@ -3,7 +3,7 @@ set -x set -e -brew update && brew install s3cmd +brew update && brew install ncurses s3cmd ZIGDIR="$(pwd)" ARCH="x86_64"