diff options
| author | klaus triendl <klaus@triendl.eu> | 2020-01-16 23:33:22 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2020-01-16 13:33:22 -0800 |
| commit | 102179f8793f90e5a24a30c5e7364008d5865ec8 (patch) | |
| tree | a104ce74d6742f8fe6b3daadce083fa135754de3 | |
| parent | 2f02076c51d7fa762251c019555f9d26414b0c96 (diff) | |
| download | vcpkg-102179f8793f90e5a24a30c5e7364008d5865ec8.tar.gz vcpkg-102179f8793f90e5a24a30c5e7364008d5865ec8.zip | |
[libxml2] Embed resources in Windows-based shared library (#9474) (#9492)
| -rw-r--r-- | ports/libxml2/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ports/libxml2/RemoveIncludeFromWindowsRcFile.patch | 10 | ||||
| -rw-r--r-- | ports/libxml2/portfile.cmake | 2 |
3 files changed, 14 insertions, 0 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/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}) |
