aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPark DongHa <luncliff@gmail.com>2021-07-16 08:00:28 +0900
committerGitHub <noreply@github.com>2021-07-15 16:00:28 -0700
commitab8067a86b8d6e278b4fc08bdcce94115d84c638 (patch)
treece0d919060c10db36646c022e52660ac4ad4e4f9
parent0c8249a2dc27f0fdb11d483d06da7c90048e8197 (diff)
downloadvcpkg-ab8067a86b8d6e278b4fc08bdcce94115d84c638.tar.gz
vcpkg-ab8067a86b8d6e278b4fc08bdcce94115d84c638.zip
[spdlog] support wchar when target is Windows (#18041)
* [spdlog] support wchar when targeting Windows * filename will be `std::string` * functions `wstr_to_utf8buf`, `utf8_to_wstrbuf` will be added * [spdlog] update baseline and git-tree SHA * [spdlog] make wchar_t options to port features * new feature: `wchar`, `wchar-filenames` * update git-tree SHA * Update ports/spdlog/portfile.cmake Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> * Update ports/spdlog/portfile.cmake Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> * [spdlog] more clear SPDLOG_WCHAR_FILENAMES usage * Update versions/s-/spdlog.json * Update ports/spdlog/vcpkg.json Co-authored-by: Robert Schumacher <roschuma@microsoft.com> * Update ports/spdlog/portfile.cmake Co-authored-by: Robert Schumacher <roschuma@microsoft.com> * Update ports/spdlog/portfile.cmake Co-authored-by: Robert Schumacher <roschuma@microsoft.com> * [spdlog] update version SHA * [spdlog] update port version Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
-rw-r--r--ports/spdlog/portfile.cmake16
-rw-r--r--ports/spdlog/vcpkg.json6
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/s-/spdlog.json5
4 files changed, 26 insertions, 3 deletions
diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake
index 0d95db43a..1943ad86d 100644
--- a/ports/spdlog/portfile.cmake
+++ b/ports/spdlog/portfile.cmake
@@ -9,9 +9,22 @@ vcpkg_from_github(
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
- benchmark SPDLOG_BUILD_BENCH
+ benchmark SPDLOG_BUILD_BENCH
+ wchar SPDLOG_WCHAR_SUPPORT
)
+# configured in triplet file
+if(NOT DEFINED SPDLOG_WCHAR_FILENAMES)
+ set(SPDLOG_WCHAR_FILENAMES OFF)
+endif()
+if(NOT VCPKG_TARGET_IS_WINDOWS)
+ if("wchar" IN_LIST FEATURES)
+ message(WARNING "Feature 'wchar' is only supported for Windows and has no effect on other platforms.")
+ elseif(SPDLOG_WCHAR_FILENAMES)
+ message(FATAL_ERROR "Build option 'SPDLOG_WCHAR_FILENAMES' is for Windows.")
+ endif()
+endif()
+
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SPDLOG_BUILD_SHARED)
vcpkg_cmake_configure(
@@ -21,6 +34,7 @@ vcpkg_cmake_configure(
-DSPDLOG_FMT_EXTERNAL=ON
-DSPDLOG_INSTALL=ON
-DSPDLOG_BUILD_SHARED=${SPDLOG_BUILD_SHARED}
+ -DSPDLOG_WCHAR_FILENAMES=${SPDLOG_WCHAR_FILENAMES}
-DSPDLOG_BUILD_EXAMPLE=OFF
)
diff --git a/ports/spdlog/vcpkg.json b/ports/spdlog/vcpkg.json
index 21f33d83d..ec5df5609 100644
--- a/ports/spdlog/vcpkg.json
+++ b/ports/spdlog/vcpkg.json
@@ -1,9 +1,10 @@
{
"name": "spdlog",
"version-semver": "1.8.5",
- "port-version": 3,
+ "port-version": 4,
"description": "Very fast, header only, C++ logging library",
"homepage": "https://github.com/gabime/spdlog",
+ "license": "MIT",
"dependencies": [
"fmt",
{
@@ -21,6 +22,9 @@
"dependencies": [
"benchmark"
]
+ },
+ "wchar": {
+ "description": "Build with wchar_t (Windows only)"
}
}
}
diff --git a/versions/baseline.json b/versions/baseline.json
index 77ac75430..247bf707b 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5946,7 +5946,7 @@
},
"spdlog": {
"baseline": "1.8.5",
- "port-version": 3
+ "port-version": 4
},
"spectra": {
"baseline": "0.9.0",
diff --git a/versions/s-/spdlog.json b/versions/s-/spdlog.json
index f0dd94172..1c0c72dae 100644
--- a/versions/s-/spdlog.json
+++ b/versions/s-/spdlog.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "ac601a8d86ea3edc831933ad7e12eee11ac6e6db",
+ "version-semver": "1.8.5",
+ "port-version": 4
+ },
+ {
"git-tree": "f74643a7b8056237da08c41a653f5b0592870906",
"version-semver": "1.8.5",
"port-version": 3