zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 418b2e7d47cbfdd8d04c362b758c96b533674282 (tree)
parent 57c4d38c556238530af9b643b4dbc481de417782
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Sun, 30 Sep 2018 16:45:33 -0400

build: omit finding libxml2, zlib since no direct dependency

Diffstat:
MCMakeLists.txt | 29+++++------------------------
MREADME.md | 1-
2 files changed, 5 insertions(+), 25 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -50,31 +50,12 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead find_package(llvm) find_package(clang) -# TODO fix https://github.com/ziglang/docker-zig/issues/7 -list(REMOVE_ITEM LLVM_LIBRARIES "-l/deps/local/lib/libxml2.a") - -if(NOT MSVC) - find_library(LIBXML2 NAMES xml2 libxml2) - if(${LIBXML2} STREQUAL "LIBXML2-NOTFOUND") - message(FATAL_ERROR "Could not find libxml2") - else() - message("${LIBXML2} found") - endif() - +if(APPLE AND ZIG_STATIC) + list(REMOVE_ITEM LLVM_LIBRARIES "-lz") + list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses") find_library(ZLIB NAMES z zlib libz) - if(${ZLIB} STREQUAL "ZLIB-NOTFOUND") - message(FATAL_ERROR "Could not find zlib") - else() - message("${ZLIB} found") - endif() - - if(APPLE AND ZIG_STATIC) - list(REMOVE_ITEM LLVM_LIBRARIES "-lz") - list(REMOVE_ITEM LLVM_LIBRARIES "-lxml2") - list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses") - find_library(LIBNCURSES NAMES libncurses.a) - list(APPEND LLVM_LIBRARIES "${LIBNCURSES}" "${LIBXML2}" "${ZLIB}") - endif() + find_library(LIBNCURSES NAMES libncurses.a) + list(APPEND LLVM_LIBRARIES "${LIBNCURSES}" "${ZLIB}") endif() set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") diff --git a/README.md b/README.md @@ -88,7 +88,6 @@ that counts as "freestanding" for the purposes of this table. * cmake >= 2.8.5 * gcc >= 5.0.0 or clang >= 3.6.0 * LLVM, Clang, LLD development libraries == 7.x, compiled with the same gcc or clang version above - - These depend on zlib and libxml2. ##### Windows