[fmt] Force headers in shared build to always have FMT_SHARED.

Fixes #331.
This commit is contained in:
Robert Schumacher 2017-02-09 17:23:15 -08:00
parent cfd5adaf13
commit 43665857a3
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,3 @@
Source: fmt
Version: 3.0.1-3
Version: 3.0.1-4
Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams.

View File

@ -30,6 +30,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmt.dll)
# Force FMT_SHARED to 1
file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/format.h FMT_FORMAT_H)
string(REPLACE "defined(FMT_SHARED)" "1" FMT_FORMAT_H "${FMT_FORMAT_H}")
file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/format.h "${FMT_FORMAT_H}")
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
#file(REMOVE ${CURRENT_PACKAGES_DIR}/include/fmt/format.cc)