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 /ports/fmt | |
| 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>
Diffstat (limited to 'ports/fmt')
| -rw-r--r-- | ports/fmt/CONTROL | 2 | ||||
| -rw-r--r-- | ports/fmt/portfile.cmake | 24 |
2 files changed, 15 insertions, 11 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() |
