aboutsummaryrefslogtreecommitdiff
path: root/ports/libxml2
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-02-04 15:50:10 -0800
committerRobert Schumacher <roschuma@microsoft.com>2020-02-04 15:50:10 -0800
commit6f66ad14fe9da11d4bf50f5b25b4da86ed971c53 (patch)
tree0f5dbcd1719cd6a8e486c4058cfefd607d58aa6c /ports/libxml2
parentd502f061bb3ee0258d6453acbf258b9e5d93d564 (diff)
parentd808514c9df44bb97d6eccff952bfe8ec4e156f7 (diff)
downloadvcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.tar.gz
vcpkg-6f66ad14fe9da11d4bf50f5b25b4da86ed971c53.zip
Merge remote-tracking branch 'origin/master' into HEAD
Diffstat (limited to 'ports/libxml2')
-rw-r--r--ports/libxml2/CMakeLists.txt2
-rw-r--r--ports/libxml2/CONTROL2
-rw-r--r--ports/libxml2/RemoveIncludeFromWindowsRcFile.patch10
-rw-r--r--ports/libxml2/portfile.cmake2
-rw-r--r--ports/libxml2/vcpkg-cmake-wrapper.cmake7
5 files changed, 22 insertions, 1 deletions
diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt
index 12142f4ff..69fc246f9 100644
--- a/ports/libxml2/CMakeLists.txt
+++ b/ports/libxml2/CMakeLists.txt
@@ -123,6 +123,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsSt
-DHAVE_WIN32_THREADS
_WINSOCK_DEPRECATED_NO_WARNINGS
)
+ target_sources(libxml2 PRIVATE win32/libxml2.rc)
+ set_source_files_properties(win32/libxml2.rc PROPERTIES COMPILE_FLAGS "-DLIBXML_MAJOR_VERSION=${LIBXML_MAJOR_VERSION} -DLIBXML_MINOR_VERSION=${LIBXML_MINOR_VERSION} -DLIBXML_MICRO_VERSION=${LIBXML_MICRO_VERSION} -DLIBXML_DOTTED_VERSION=\\\"${VERSION}\\\"")
endif()
target_compile_definitions(libxml2 PRIVATE
diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL
index 7a4b02cea..ccf2a9c60 100644
--- a/ports/libxml2/CONTROL
+++ b/ports/libxml2/CONTROL
@@ -1,5 +1,5 @@
Source: libxml2
-Version: 2.9.9-4
+Version: 2.9.9-5
Homepage: https://xmlsoft.org/
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
Build-Depends: zlib, libiconv, liblzma
diff --git a/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch b/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch
new file mode 100644
index 000000000..ce5a3fcbe
--- /dev/null
+++ b/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch
@@ -0,0 +1,10 @@
+diff --git a/win32/libxml2.rc b/win32/libxml2.rc
+index c774a5ee..08e2da1e 100644
+--- a/win32/libxml2.rc
++++ b/win32/libxml2.rc
+@@ -1,5 +1,4 @@
+ #include <winver.h>
+-#include "rcVersion.h"
+
+ VS_VERSION_INFO VERSIONINFO
+ FILEVERSION LIBXML_MAJOR_VERSION,LIBXML_MINOR_VERSION,LIBXML_MICRO_VERSION,0
diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake
index de2dfe0af..f7b0cd81a 100644
--- a/ports/libxml2/portfile.cmake
+++ b/ports/libxml2/portfile.cmake
@@ -6,6 +6,8 @@ vcpkg_from_github(
REF v2.9.9
SHA512 bfcc08bd033f538a968205f0f9e2da4c3438ec2f35f017289783903365e13ed93d83f2f63c7497344a362b7418170ee586a5ecb45493e30feaa0f62b22a57b54
HEAD_REF master
+ PATCHES
+ RemoveIncludeFromWindowsRcFile.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake
index b6ec9571a..50eca4d61 100644
--- a/ports/libxml2/vcpkg-cmake-wrapper.cmake
+++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake
@@ -12,6 +12,13 @@ if(LibXml2_FOUND)
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib
ws2_32)
+ if(TARGET LibXml2::LibXml2)
+ target_link_libraries(LibXml2::LibXml2 INTERFACE
+ debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
+ optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib
+ debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
+ optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib)
+ endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND LIBXML2_LIBRARIES m)
endif()