aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Beatrici <davidebeatrici@gmail.com>2019-11-20 07:21:43 +0100
committerDavide Beatrici <davidebeatrici@gmail.com>2019-11-20 07:21:43 +0100
commitb4ee1a289a6c184bd8ec4bbd98ff0183a44e7dfe (patch)
treea74a38fd35696b4d3d13c74762f0bf9c9f3f558f
parent0887012a3f399079b9ca8fc1378ec7b3cd005e4e (diff)
downloadvcpkg-b4ee1a289a6c184bd8ec4bbd98ff0183a44e7dfe.tar.gz
vcpkg-b4ee1a289a6c184bd8ec4bbd98ff0183a44e7dfe.zip
mdnsresponder: fix build with dynamic CRT
mdnsresponder was being built with static CRT even when VCPKG_CRT_LINKAGE was set to "dynamic": -- Performing post-build validation Expected Debug,Dynamic crt linkage, but the following libs had invalid crt linkage: C:/vcpkg/packages/mdnsresponder_x64-windows-static-md/debug/lib/dnssd.lib: Debug,Static To inspect the lib files, use: dumpbin.exe /directives mylibfile.lib Expected Release,Dynamic crt linkage, but the following libs had invalid crt linkage: C:/vcpkg/packages/mdnsresponder_x64-windows-static-md/lib/dnssd.lib: Release,Static To inspect the lib files, use: dumpbin.exe /directives mylibfile.lib Found 2 error(s). Please correct the portfile: C:\vcpkg\ports\mdnsresponder\portfile.cmake -- Performing post-build validation done Error: Building package mdnsresponder:x64-windows-static-md failed with: POST_BUILD_CHECKS_FAILED
-rw-r--r--ports/mdnsresponder/CONTROL2
-rw-r--r--ports/mdnsresponder/portfile.cmake29
2 files changed, 17 insertions, 14 deletions
diff --git a/ports/mdnsresponder/CONTROL b/ports/mdnsresponder/CONTROL
index a94e7866c..66c039dbc 100644
--- a/ports/mdnsresponder/CONTROL
+++ b/ports/mdnsresponder/CONTROL
@@ -1,4 +1,4 @@
Source: mdnsresponder
-Version: 765.30.11-1
+Version: 765.30.11-2
Description: The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative.
Homepage: https://developer.apple.com/bonjour/
diff --git a/ports/mdnsresponder/portfile.cmake b/ports/mdnsresponder/portfile.cmake
index 46ab04ddb..c37b07a20 100644
--- a/ports/mdnsresponder/portfile.cmake
+++ b/ports/mdnsresponder/portfile.cmake
@@ -21,33 +21,36 @@ ENDIF()
function(FIX_VCXPROJ VCXPROJ_PATH)
file(READ ${VCXPROJ_PATH} ORIG)
- if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- string(REPLACE
- "<ConfigurationType>StaticLibrary</ConfigurationType>"
- "<ConfigurationType>DynamicLibrary</ConfigurationType>"
- ORIG "${ORIG}")
+ if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic")
string(REGEX REPLACE
- "<RuntimeLibrary>*</RuntimeLibrary>"
+ "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
"<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
ORIG "${ORIG}")
string(REGEX REPLACE
- "<RuntimeLibrary>*</RuntimeLibrary>"
+ "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
"<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
ORIG "${ORIG}")
else()
- string(REPLACE
- "<ConfigurationType>DynamicLibrary</ConfigurationType>"
- "<ConfigurationType>StaticLibrary</ConfigurationType>"
- ORIG "${ORIG}")
string(REGEX REPLACE
- "<RuntimeLibrary>*Debug</RuntimeLibrary>"
+ "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
"<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
ORIG "${ORIG}")
string(REGEX REPLACE
- "<RuntimeLibrary>*</RuntimeLibrary>"
+ "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
ORIG "${ORIG}")
endif()
+ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
+ string(REPLACE
+ "<ConfigurationType>StaticLibrary</ConfigurationType>"
+ "<ConfigurationType>DynamicLibrary</ConfigurationType>"
+ ORIG "${ORIG}")
+ else()
+ string(REPLACE
+ "<ConfigurationType>DynamicLibrary</ConfigurationType>"
+ "<ConfigurationType>StaticLibrary</ConfigurationType>"
+ ORIG "${ORIG}")
+ endif()
file(WRITE ${VCXPROJ_PATH} "${ORIG}")
endfunction()