Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions ports/spdlog/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
wchar SPDLOG_WCHAR_SUPPORT
)

# configured in triplet file
# SPDLOG_WCHAR_FILENAMES can only be configured in triplet file since it is an alternative (not additive)
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)
elseif(SPDLOG_WCHAR_FILENAMES)
message(FATAL_ERROR "Build option 'SPDLOG_WCHAR_FILENAMES' is for Windows.")
endif()
endif()
Expand All @@ -45,10 +45,23 @@ vcpkg_copy_pdbs()
# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled)

# add support for integration other than cmake
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
"// #define SPDLOG_FMT_EXTERNAL"
"#define SPDLOG_FMT_EXTERNAL"
"#ifndef SPDLOG_FMT_EXTERNAL\n#define SPDLOG_FMT_EXTERNAL\n#endif"
)
if(SPDLOG_WCHAR_SUPPORT)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
"// #define SPDLOG_WCHAR_TO_UTF8_SUPPORT"
"#ifndef SPDLOG_WCHAR_TO_UTF8_SUPPORT\n#define SPDLOG_WCHAR_TO_UTF8_SUPPORT\n#endif"
)
endif()
if(SPDLOG_WCHAR_FILENAMES)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/tweakme.h
"// #define SPDLOG_WCHAR_FILENAMES"
"#ifndef SPDLOG_WCHAR_FILENAMES\n#define SPDLOG_WCHAR_FILENAMES\n#endif"
)
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share)
Expand Down
1 change: 1 addition & 0 deletions ports/spdlog/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "spdlog",
"version-semver": "1.10.0",
"port-version": 1,
"description": "Very fast, header only, C++ logging library",
"homepage": "https://github.com/gabime/spdlog",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6690,7 +6690,7 @@
},
"spdlog": {
"baseline": "1.10.0",
"port-version": 0
"port-version": 1
},
"spectra": {
"baseline": "1.0.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/spdlog.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3256ea88cc375fda2f977a2eb18435e23d498572",
"version-semver": "1.10.0",
"port-version": 1
},
{
"git-tree": "1ac795913d88241171b45d796d3fe5dd38519d5a",
"version-semver": "1.10.0",
Expand Down