mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 17:51:47 +08:00
4f9117c0de
* [fmt] Update to 7.0.0 * [fmt] Update to 7.0.1 * [spdlog] Update to 1.7.0 * [quill] Patch for fmt 7.x * [fmt] Update to 7.0.2 * [quill] Update baseline * [fmt] Use vcpkg_replace_string * remove unnecessary change to `SOURCE_PATH` Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
63 lines
2.2 KiB
CMake
63 lines
2.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO fmtlib/fmt
|
|
REF b9d749095e3397f154e2938f96dd11912f2d9300#version 7.0.2
|
|
SHA512 5e81369ba97fb9e7fbaeed87b23fc7f1db1459d5c67eba1d92a697840fa004097d714127381aa2aa1437f5730b27e38a71e3ddf6a4a73c8d5eeaa32b3efb3d80
|
|
HEAD_REF master
|
|
PATCHES fix-warning4189.patch
|
|
)
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DFMT_CMAKE_DIR=share/fmt
|
|
-DFMT_TEST=OFF
|
|
-DFMT_DOC=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll")
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll)
|
|
endif()
|
|
endif()
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/fmt.dll")
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fmt/core.h
|
|
"defined(FMT_SHARED)"
|
|
"1"
|
|
)
|
|
endif()
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
vcpkg_fixup_cmake_targets()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake
|
|
"lib/fmtd.dll"
|
|
"bin/fmtd.dll"
|
|
)
|
|
endif()
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake
|
|
"lib/fmt.dll"
|
|
"bin/fmt.dll"
|
|
)
|
|
endif()
|
|
endif()
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
vcpkg_copy_pdbs()
|