[libxml2] Embed resources in Windows-based shared library (#9474) (#9492)

This commit is contained in:
klaus triendl 2020-01-16 23:33:22 +02:00 committed by Victor Romero
parent 2f02076c51
commit 102179f879
3 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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})