| ... | @@ -49,6 +49,22 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead | ... | @@ -49,6 +49,22 @@ option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead |
| 49 | find_package(llvm) | 49 | find_package(llvm) |
| 50 | find_package(clang) | 50 | find_package(clang) |
| 51 | | 51 | |
| | 52 | if(NOT MSVC) |
| | 53 | find_library(LIBXML2 NAMES xml2 libxml2) |
| | 54 | if(${LIBXML2} STREQUAL "LIBXML2-NOTFOUND") |
| | 55 | message(FATAL_ERROR "Could not find libxml2") |
| | 56 | else() |
| | 57 | message("${LIBXML2} found") |
| | 58 | endif() |
| | 59 | |
| | 60 | find_library(ZLIB NAMES z zlib libz) |
| | 61 | if(${ZLIB} STREQUAL "ZLIB-NOTFOUND") |
| | 62 | message(FATAL_ERROR "Could not find zlib") |
| | 63 | else() |
| | 64 | message("${ZLIB} found") |
| | 65 | endif() |
| | 66 | endif() |
| | 67 | |
| 52 | set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") | 68 | set(ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR}/zig_cpp") |
| 53 | | 69 | |
| 54 | if(ZIG_FORCE_EXTERNAL_LLD) | 70 | if(ZIG_FORCE_EXTERNAL_LLD) |
| ... | @@ -710,7 +726,7 @@ target_link_libraries(zig LINK_PUBLIC | ... | @@ -710,7 +726,7 @@ target_link_libraries(zig LINK_PUBLIC |
| 710 | ${CMAKE_THREAD_LIBS_INIT} | 726 | ${CMAKE_THREAD_LIBS_INIT} |
| 711 | ) | 727 | ) |
| 712 | if(NOT MSVC) | 728 | if(NOT MSVC) |
| 713 | target_link_libraries(zig LINK_PUBLIC xml2) | 729 | target_link_libraries(zig LINK_PUBLIC ${LIBXML2}) |
| 714 | endif() | 730 | endif() |
| 715 | if(ZIG_DIA_GUIDS_LIB) | 731 | if(ZIG_DIA_GUIDS_LIB) |
| 716 | target_link_libraries(zig LINK_PUBLIC ${ZIG_DIA_GUIDS_LIB}) | 732 | target_link_libraries(zig LINK_PUBLIC ${ZIG_DIA_GUIDS_LIB}) |