| ... | ... | @@ -50,31 +50,12 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead |
| 50 | 50 | find_package(llvm) |
| 51 | 51 | find_package(clang) |
| 52 | 52 | |
| 53 | | # TODO fix https://github.com/ziglang/docker-zig/issues/7 |
| 54 | | list(REMOVE_ITEM LLVM_LIBRARIES "-l/deps/local/lib/libxml2.a") |
| 55 | | |
| 56 | | if(NOT MSVC) |
| 57 | | find_library(LIBXML2 NAMES xml2 libxml2) |
| 58 | | if(${LIBXML2} STREQUAL "LIBXML2-NOTFOUND") |
| 59 | | message(FATAL_ERROR "Could not find libxml2") |
| 60 | | else() |
| 61 | | message("${LIBXML2} found") |
| 62 | | endif() |
| 63 | | |
| 53 | if(APPLE AND ZIG_STATIC) |
| 54 | list(REMOVE_ITEM LLVM_LIBRARIES "-lz") |
| 55 | list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses") |
| 64 | 56 | find_library(ZLIB NAMES z zlib libz) |
| 65 | | if(${ZLIB} STREQUAL "ZLIB-NOTFOUND") |
| 66 | | message(FATAL_ERROR "Could not find zlib") |
| 67 | | else() |
| 68 | | message("${ZLIB} found") |
| 69 | | endif() |
| 70 | | |
| 71 | | if(APPLE AND ZIG_STATIC) |
| 72 | | list(REMOVE_ITEM LLVM_LIBRARIES "-lz") |
| 73 | | list(REMOVE_ITEM LLVM_LIBRARIES "-lxml2") |
| 74 | | list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses") |
| 75 | | find_library(LIBNCURSES NAMES libncurses.a) |
| 76 | | list(APPEND LLVM_LIBRARIES "${LIBNCURSES}" "${LIBXML2}" "${ZLIB}") |
| 77 | | endif() |
| 57 | find_library(LIBNCURSES NAMES libncurses.a) |
| 58 | list(APPEND LLVM_LIBRARIES "${LIBNCURSES}" "${ZLIB}") |
| 78 | 59 | endif() |
| 79 | 60 | |
| 80 | 61 | set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") |