authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-05-05 18:52:24-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-22 07:01:21-07:00
log33c3bf06317a19ec7cb2f7fdbea51acae66ef963
tree1f3482071c34ece3bddfedeb687b6eee9c423cba
parent2563d32425e35c8500619e93375a8fa9fdeece11

cmake: make static curses configurable

Not sure why this exists in the first place, but disabling it reduces the required dependencies of a CI runner.

1 files changed, 7 insertions(+), 1 deletions(-)

CMakeLists.txt+7-1
......@@ -92,6 +92,12 @@ set(ZIG_SHARED_LLVM off CACHE BOOL "Prefer linking against shared LLVM libraries
9292set(ZIG_STATIC_LLVM ${ZIG_STATIC} CACHE BOOL "Prefer linking against static LLVM libraries")
9393set(ZIG_STATIC_ZLIB ${ZIG_STATIC} CACHE BOOL "Prefer linking against static zlib")
9494set(ZIG_STATIC_ZSTD ${ZIG_STATIC} CACHE BOOL "Prefer linking against static zstd")
95if(APPLE AND ZIG_STATIC)
96 set(ZIG_STATIC_CURSES on)
97else()
98 set(ZIG_STATIC_CURSES off)
99endif()
100set(ZIG_STATIC_CURSES ${ZIG_STATIC_CURSES} CACHE BOOL "Prefer linking against static curses")
95101set(ZIG_USE_CCACHE off CACHE BOOL "Use ccache")
96102
97103if(ZIG_USE_CCACHE)
......@@ -160,7 +166,7 @@ if(ZIG_STATIC_ZSTD)
160166 list(APPEND LLVM_LIBRARIES "${ZSTD}")
161167endif()
162168
163if(APPLE AND ZIG_STATIC)
169if(ZIG_STATIC_CURSES)
164170 list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses")
165171 find_library(CURSES NAMES libcurses.a libncurses.a NAMES_PER_DIR
166172 PATHS