Skip to content

Commit

Permalink
xml2 workaround is relevant for linux too
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Mar 10, 2018
1 parent 10fb1f2 commit 5bc4f1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -709,7 +709,7 @@ target_link_libraries(zig LINK_PUBLIC
${LLVM_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
if(APPLE)
if(NOT MSVC)
target_link_libraries(zig LINK_PUBLIC xml2)
endif()
if(ZIG_DIA_GUIDS_LIB)
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -126,6 +126,7 @@ libc. Create demo games using Zig.
* cmake >= 2.8.5
* gcc >= 5.0.0 or clang >= 3.6.0
* LLVM, Clang, LLD development libraries == 6.x, compiled with the same gcc or clang version above
- These depend on zlib and libxml2.

##### Windows

Expand Down
4 changes: 3 additions & 1 deletion build.zig
Expand Up @@ -68,14 +68,16 @@ pub fn build(b: &Builder) !void {

exe.linkSystemLibrary("pthread");
} else if (exe.target.isDarwin()) {
exe.linkSystemLibrary("xml2");
exe.linkSystemLibrary("c++");
}

if (dia_guids_lib.len != 0) {
exe.addObjectFile(dia_guids_lib);
}

if (exe.target.getOs() != builtin.Os.windows) {
exe.linkSystemLibrary("xml2");
}
exe.linkSystemLibrary("c");

b.default_step.dependOn(&exe.step);
Expand Down

0 comments on commit 5bc4f1e

Please sign in to comment.