From f1b6b40adfe10d9e53ca6e14fd5e21f83a58e9b7 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Sun, 26 Jul 2009 09:48:10 +0000 Subject: [PATCH] # Fix build issues by removing FCollada's bundled libxml2 On Windows, dynamically link to our standard libraries/libxml2/... implementation. This was SVN commit r7035. --- build/premake/premake.lua | 5 +---- source/collada/CommonConvert.cpp | 8 +------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/build/premake/premake.lua b/build/premake/premake.lua index 3e43604326..5b0dc67bcf 100755 --- a/build/premake/premake.lua +++ b/build/premake/premake.lua @@ -853,10 +853,6 @@ function setup_collada_package(package_name, target_type, rel_source_dirs, rel_i if extra_params["extra_links"] then listconcat(package.links, extra_params["extra_links"]) end - - else - tinsert(package.buildoptions, "`pkg-config libxml-2.0 --cflags`") - tinsert(package.linkoptions, "`pkg-config libxml-2.0 --libs`") end if OS == "linux" then @@ -883,6 +879,7 @@ function setup_collada_packages() },{ -- extern_libs "fcollada", "dl", + "libxml2", },{ -- extra_params pch = 1, }) diff --git a/source/collada/CommonConvert.cpp b/source/collada/CommonConvert.cpp index 94e365c354..6998e21c0c 100644 --- a/source/collada/CommonConvert.cpp +++ b/source/collada/CommonConvert.cpp @@ -101,13 +101,7 @@ void FColladaDocument::LoadFromText(const char *text) bool status = FCollada::LoadDocumentFromMemory("unknown.dae", document.get(), (void*)newText, newTextSize); if (newText != text) - { - // It'd be nice to use xmlFree, but for some reason (?) it causes - // linker errors in MSVC. So get access to it an ugly way: - xmlFreeFunc freeFunc; - xmlMemGet(&freeFunc, NULL, NULL, NULL); - freeFunc((void*)newText); - } + xmlFree((void*)newText); REQUIRE_SUCCESS(status); }