aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-02-09 17:23:15 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-02-09 17:23:34 -0800
commit43665857a3ad11de8135c7fd6cd9839269212d7d (patch)
tree624e9d1ce9886a3e37fca5799b656f1e02114538
parentcfd5adaf135ccfe2ade3bce43a00d27abd007b0a (diff)
downloadvcpkg-43665857a3ad11de8135c7fd6cd9839269212d7d.tar.gz
vcpkg-43665857a3ad11de8135c7fd6cd9839269212d7d.zip
[fmt] Force headers in shared build to always have FMT_SHARED.
Fixes #331.
-rw-r--r--ports/fmt/CONTROL2
-rw-r--r--ports/fmt/portfile.cmake4
2 files changed, 5 insertions, 1 deletions
diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL
index 2c90cc300..4e980b4d5 100644
--- a/ports/fmt/CONTROL
+++ b/ports/fmt/CONTROL
@@ -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.
diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake
index 5fbbcc12e..959a0ebe7 100644
--- a/ports/fmt/portfile.cmake
+++ b/ports/fmt/portfile.cmake
@@ -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)