2016-09-21 19:45:16 +03:00
|
|
|
include(vcpkg_common_functions)
|
2017-06-15 00:55:26 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO fmtlib/fmt
|
2018-05-22 18:03:29 +01:00
|
|
|
REF 5.0.0
|
|
|
|
SHA512 1ce93648ab7aca6082767ff009d5836e226fa42f183852ca15230f371ef0a34878110ca63d8669a68de7f115c137fdaa11de998986a9440f08d50f0f214ebb90
|
2017-06-15 00:55:26 +02:00
|
|
|
HEAD_REF master
|
2016-09-21 19:45:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2016-09-28 17:05:56 -07:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-02-03 17:16:13 +01:00
|
|
|
PREFER_NINJA
|
2016-09-21 19:45:16 +03:00
|
|
|
OPTIONS
|
2016-11-10 22:04:45 -05:00
|
|
|
-DFMT_CMAKE_DIR=share/fmt
|
2016-09-21 19:45:16 +03:00
|
|
|
-DFMT_TEST=OFF
|
2016-09-29 11:17:57 -07:00
|
|
|
-DFMT_DOC=OFF
|
2018-06-28 22:15:06 +09:00
|
|
|
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
|
2016-09-21 19:45:16 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2016-09-28 17:05:56 -07:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmt RENAME copyright)
|
2016-11-10 22:04:45 -05:00
|
|
|
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)
|
2018-05-22 18:03:29 +01:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll)
|
2016-11-10 22:04:45 -05:00
|
|
|
|
2017-02-09 17:23:15 -08:00
|
|
|
# Force FMT_SHARED to 1
|
2018-05-22 19:44:33 +01:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/core.h FMT_CORE_H)
|
|
|
|
string(REPLACE "defined(FMT_SHARED)" "1" FMT_CORE_H "${FMT_CORE_H}")
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/core.h "${FMT_CORE_H}")
|
2016-11-10 22:04:45 -05:00
|
|
|
endif()
|
2016-09-21 19:45:16 +03:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-06-15 00:55:26 +02:00
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets()
|
2016-11-22 15:51:35 -05:00
|
|
|
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE)
|
2018-05-22 19:44:33 +01:00
|
|
|
string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE})
|
2016-11-22 15:51:35 -05:00
|
|
|
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}")
|
2016-11-10 22:04:45 -05:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2016-09-21 19:45:16 +03:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|