diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-10-25 13:31:02 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-10-25 13:31:02 -0700 |
| commit | 1cdcb7904084484ccfa75f32ba581d9e2dda45c8 (patch) | |
| tree | e5ac5e388c2cec5c3535f8c83dc005710f0624bc | |
| parent | e45fb7498d4a373669bf8aaa26dea284bc31b7a5 (diff) | |
| download | vcpkg-1cdcb7904084484ccfa75f32ba581d9e2dda45c8.tar.gz vcpkg-1cdcb7904084484ccfa75f32ba581d9e2dda45c8.zip | |
[mpir] Enable lib/md.
| -rw-r--r-- | ports/mpir/CONTROL | 2 | ||||
| -rw-r--r-- | ports/mpir/enable-runtimelibrary-toggle.patch | 26 | ||||
| -rw-r--r-- | ports/mpir/portfile.cmake | 14 |
3 files changed, 39 insertions, 3 deletions
diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index e80853a7d..b9d1b2d74 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,3 +1,3 @@ Source: mpir -Version: 3.0.0-2 +Version: 3.0.0-3 Description: Multiple Precision Integers and Rationals. diff --git a/ports/mpir/enable-runtimelibrary-toggle.patch b/ports/mpir/enable-runtimelibrary-toggle.patch new file mode 100644 index 000000000..d0260e869 --- /dev/null +++ b/ports/mpir/enable-runtimelibrary-toggle.patch @@ -0,0 +1,26 @@ +diff --git a/build.vc/mpir_debug_lib.props b/build.vc/mpir_debug_lib.props +index b2fd57b..3937570 100644 +--- a/build.vc/mpir_debug_lib.props ++++ b/build.vc/mpir_debug_lib.props +@@ -9,7 +9,7 @@ + <ItemDefinitionGroup> + <ClCompile> + <ObjectFileName>$(IntDir)dum\my\%(RelativeDir)</ObjectFileName> +- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> ++ <RuntimeLibrary>$(RuntimeLibrary)</RuntimeLibrary> + <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> +diff --git a/build.vc/mpir_release_lib.props b/build.vc/mpir_release_lib.props +index 6cdff3e..3937570 100644 +--- a/build.vc/mpir_release_lib.props ++++ b/build.vc/mpir_release_lib.props +@@ -9,7 +9,7 @@ + <ItemDefinitionGroup> + <ClCompile> + <ObjectFileName>$(IntDir)dum\my\%(RelativeDir)</ObjectFileName> +- <RuntimeLibrary>MultiThreaded</RuntimeLibrary> ++ <RuntimeLibrary>$(RuntimeLibrary)</RuntimeLibrary> + <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName> + </ClCompile> + <Link> diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index cc5cab8b8..c56cfa545 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -6,8 +6,6 @@ endif() if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") message(FATAL_ERROR "MPIR currently can only be built using the dynamic CRT when building DLLs") -elseif(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - message(FATAL_ERROR "MPIR currently can only be built using the static CRT when building LIBs") endif() set(MPIR_VERSION 3.0.0) @@ -21,6 +19,11 @@ vcpkg_download_distfile(ARCHIVE_FILE ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-runtimelibrary-toggle.patch" +) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(MSVC_VERSION 15) else() @@ -32,8 +35,15 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_mpir_gc/dll_mpir_gc.vcxproj ) else() + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_mpir_gc/lib_mpir_gc.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) endif() |
