diff options
| author | Andrei Lebedev <lebdron@gmail.com> | 2019-05-20 20:24:51 +0300 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-05-20 10:24:51 -0700 |
| commit | 4b45f9b56d62c8096520a9f1bdca42182372a4ea (patch) | |
| tree | e2034b1805138679e8aa55e2a5e0ea1bbbd7a1cd | |
| parent | a792611535450e33c2fd873196d29aed4b45eb1f (diff) | |
| download | vcpkg-4b45f9b56d62c8096520a9f1bdca42182372a4ea.tar.gz vcpkg-4b45f9b56d62c8096520a9f1bdca42182372a4ea.zip | |
[grpc,fmt,zstd] Add Windows-specific conditionals (#6509)
Check VCPKG_CMAKE_SYSTEM_NAME prior to performing Windows-specific
actions in portfiles
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
| -rw-r--r-- | ports/fmt/CONTROL | 2 | ||||
| -rw-r--r-- | ports/fmt/portfile.cmake | 24 | ||||
| -rw-r--r-- | ports/grpc/CONTROL | 2 | ||||
| -rw-r--r-- | ports/grpc/portfile.cmake | 4 | ||||
| -rw-r--r-- | ports/zstd/CONTROL | 2 | ||||
| -rw-r--r-- | ports/zstd/portfile.cmake | 2 |
6 files changed, 21 insertions, 15 deletions
diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 79e7804d5..7c2d5d930 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 5.3.0-1 +Version: 5.3.0-2 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 228ed7651..f1778d985 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -18,10 +18,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmt RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) + endif() # Force FMT_SHARED to 1 file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/core.h FMT_CORE_H) @@ -32,12 +34,14 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets() -file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) -string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake FMT_RELEASE_MODULE) -string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_RELEASE_MODULE ${FMT_RELEASE_MODULE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake "${FMT_RELEASE_MODULE}") +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) + string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") + file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake FMT_RELEASE_MODULE) + string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_RELEASE_MODULE ${FMT_RELEASE_MODULE}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake "${FMT_RELEASE_MODULE}") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) vcpkg_copy_pdbs() diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 1854600e3..c2ce84cc2 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.20.1 +Version: 1.20.1-1 Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index fc0299b8d..e8576d533 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -1,6 +1,8 @@ include(vcpkg_common_functions) -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() # This snippet is a workaround for users who are upgrading from an extremely old version of this # port, which cloned directly into `src\` diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index 985c24b0c..a0125ee54 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.7-1 +Version: 1.3.7-2 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index dfbb2e3f2..98440ab17 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -40,7 +40,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +if((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") foreach(HEADER zdict.h zstd.h zstd_errors.h) file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") |
