| ... | ... | @@ -90,6 +90,7 @@ set(ZIG_STATIC_LLVM ${ZIG_STATIC} CACHE BOOL "Prefer linking against static LLVM |
| 90 | 90 | set(ZIG_STATIC_ZLIB ${ZIG_STATIC} CACHE BOOL "Prefer linking against static zlib") |
| 91 | 91 | set(ZIG_STATIC_ZSTD ${ZIG_STATIC} CACHE BOOL "Prefer linking against static zstd") |
| 92 | 92 | set(ZIG_STATIC_CURSES OFF CACHE BOOL "Enable static linking against curses") |
| 93 | set(ZIG_STATIC_LIBXML2 OFF CACHE BOOL "Enable static linking against libxml2") |
| 93 | 94 | |
| 94 | 95 | if (ZIG_SHARED_LLVM AND ZIG_STATIC_LLVM) |
| 95 | 96 | message(SEND_ERROR "-DZIG_SHARED_LLVM and -DZIG_STATIC_LLVM cannot both be enabled simultaneously") |
| ... | ... | @@ -167,6 +168,12 @@ if(ZIG_STATIC_CURSES) |
| 167 | 168 | list(APPEND LLVM_LIBRARIES "${CURSES}") |
| 168 | 169 | endif() |
| 169 | 170 | |
| 171 | if(ZIG_STATIC_LIBXML2) |
| 172 | list(REMOVE_ITEM LLVM_LIBRARIES "-lxml2") |
| 173 | find_library(LIBXML2 NAMES libxml2.a NAMES_PER_DIR) |
| 174 | list(APPEND LLVM_LIBRARIES "${LIBXML2}") |
| 175 | endif() |
| 176 | |
| 170 | 177 | find_package(Threads) |
| 171 | 178 | |
| 172 | 179 | set(ZIG_CONFIG_H_OUT "${PROJECT_BINARY_DIR}/config.h") |