diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-06-16 04:13:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-15 13:13:04 -0700 |
| commit | 36b2f28bbb499a1150a69db13c84d5d499e1d664 (patch) | |
| tree | 7148248cddb18c33e2513ec34c97de9ea9cc8446 | |
| parent | ffa7fd27cfa29f206d1fd2ccfc722cad4aaeef3d (diff) | |
| download | vcpkg-36b2f28bbb499a1150a69db13c84d5d499e1d664.tar.gz vcpkg-36b2f28bbb499a1150a69db13c84d5d499e1d664.zip | |
[mpir] Add mpirxx.lib (#9205)
* [mpir] Add mpirxx.lib
* Update
* Remove bin directory in static build
* Update support info
| -rw-r--r-- | ports/mpir/CONTROL | 4 | ||||
| -rw-r--r-- | ports/mpir/portfile.cmake | 47 |
2 files changed, 32 insertions, 19 deletions
diff --git a/ports/mpir/CONTROL b/ports/mpir/CONTROL index 79238cbb5..0871ce157 100644 --- a/ports/mpir/CONTROL +++ b/ports/mpir/CONTROL @@ -1,5 +1,5 @@ Source: mpir -Version: 3.0.0-7 +Version: 3.0.0-8 Homepage: https://github.com/wbhart/mpir Description: Multiple Precision Integers and Rationals. -Supports: !uwp
\ No newline at end of file +Supports: !(uwp|arm)
\ No newline at end of file diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index 42dd34c94..118a19602 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -1,16 +1,12 @@ -include(vcpkg_common_functions) - -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - message(FATAL_ERROR "MPIR currently can only be built for desktop") -endif() +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") 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") + message(FATAL_ERROR "${PORT} currently can only be built using the dynamic CRT when building DLLs") endif() set(MPIR_VERSION 3.0.0) -if(VCPKG_CMAKE_SYSTEM_NAME) +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) vcpkg_download_distfile( ARCHIVE URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" @@ -71,8 +67,8 @@ if(VCPKG_CMAKE_SYSTEM_NAME) ) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) - configure_file(${SOURCE_PATH}/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) -else() + file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +elseif(VCPKG_TARGET_IS_WINDOWS) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO wbhart/mpir @@ -110,6 +106,16 @@ else() OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_build_msbuild( + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/build.vc${MSVC_VERSION}/${DLL_OR_LIB}_mpir_cxx/${DLL_OR_LIB}_mpir_cxx.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + ) + file(GLOB REL_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.lib) + file(GLOB DBG_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpirxx.lib) + endif() file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmp.h @@ -117,20 +123,27 @@ else() ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.h ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.h ) - file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.dll) file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.lib) file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.dll) file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.lib) - - file(COPY ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) - file(COPY ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(COPY ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) - file(COPY ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + list(APPEND REL_LIBS ${REL_LIBS_CXX}) + list(APPEND DBG_LIBS ${DBG_LIBS_CXX}) + + file(INSTALL ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() vcpkg_copy_pdbs() - configure_file(${SOURCE_PATH}/COPYING.lib ${CURRENT_PACKAGES_DIR}/share/mpir/copyright COPYONLY) -endif() + file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif()
\ No newline at end of file |
