diff --git a/ports/spdlog/portfile.cmake b/ports/spdlog/portfile.cmake index 264772c85e1a2d..e460dc0a738c2b 100644 --- a/ports/spdlog/portfile.cmake +++ b/ports/spdlog/portfile.cmake @@ -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() @@ -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) diff --git a/ports/spdlog/vcpkg.json b/ports/spdlog/vcpkg.json index b643f8bf15090e..88c8341670efaa 100644 --- a/ports/spdlog/vcpkg.json +++ b/ports/spdlog/vcpkg.json @@ -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", diff --git a/versions/baseline.json b/versions/baseline.json old mode 100644 new mode 100755 index 87bf58967498bb..777aae65381328 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6690,7 +6690,7 @@ }, "spdlog": { "baseline": "1.10.0", - "port-version": 0 + "port-version": 1 }, "spectra": { "baseline": "1.0.1", diff --git a/versions/s-/spdlog.json b/versions/s-/spdlog.json old mode 100644 new mode 100755 index 7f9464fa02d354..4c363c1fb8f900 --- a/versions/s-/spdlog.json +++ b/versions/s-/spdlog.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3256ea88cc375fda2f977a2eb18435e23d498572", + "version-semver": "1.10.0", + "port-version": 1 + }, { "git-tree": "1ac795913d88241171b45d796d3fe5dd38519d5a", "version-semver": "1.10.0",