authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-30 16:45:33-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-30 16:56:06-04:00
log418b2e7d47cbfdd8d04c362b758c96b533674282
treef5b5025fa2c9ba3a258240cbfa578f11c9050afe
parent57c4d38c556238530af9b643b4dbc481de417782
signaturelock-open Commit is signed but in an unrecognized format.

build: omit finding libxml2, zlib since no direct dependency


2 files changed, 5 insertions(+), 25 deletions(-)

CMakeLists.txt+5-24
...@@ -50,31 +50,12 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead...@@ -50,31 +50,12 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead
50find_package(llvm)50find_package(llvm)
51find_package(clang)51find_package(clang)
5252
53# TODO fix https://github.com/ziglang/docker-zig/issues/753if(APPLE AND ZIG_STATIC)
54list(REMOVE_ITEM LLVM_LIBRARIES "-l/deps/local/lib/libxml2.a")54 list(REMOVE_ITEM LLVM_LIBRARIES "-lz")
5555 list(REMOVE_ITEM LLVM_LIBRARIES "-lcurses")
56if(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
64 find_library(ZLIB NAMES z zlib libz)56 find_library(ZLIB NAMES z zlib libz)
65 if(${ZLIB} STREQUAL "ZLIB-NOTFOUND")57 find_library(LIBNCURSES NAMES libncurses.a)
66 message(FATAL_ERROR "Could not find zlib")58 list(APPEND LLVM_LIBRARIES "${LIBNCURSES}" "${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()
78endif()59endif()
7960
80set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp")61set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp")
README.md-1
...@@ -88,7 +88,6 @@ that counts as "freestanding" for the purposes of this table....@@ -88,7 +88,6 @@ that counts as "freestanding" for the purposes of this table.
88 * cmake >= 2.8.588 * cmake >= 2.8.5
89 * gcc >= 5.0.0 or clang >= 3.6.089 * gcc >= 5.0.0 or clang >= 3.6.0
90 * LLVM, Clang, LLD development libraries == 7.x, compiled with the same gcc or clang version above90 * LLVM, Clang, LLD development libraries == 7.x, compiled with the same gcc or clang version above
91 - These depend on zlib and libxml2.
9291
93##### Windows92##### Windows
9493