Skip to content

fix(deps): standardize logger_system find_dependency to snake_case#549

Merged
kcenon merged 1 commit into
mainfrom
chore/issue-532-chore-deps-standardize-cmake-package-name-conventi
Mar 16, 2026
Merged

fix(deps): standardize logger_system find_dependency to snake_case#549
kcenon merged 1 commit into
mainfrom
chore/issue-532-chore-deps-standardize-cmake-package-name-conventi

Conversation

@kcenon

@kcenon kcenon commented Mar 16, 2026

Copy link
Copy Markdown
Owner

What

Fix cmake/monitoring_system-config.cmake.in and CMakeLists.txt to use the snake_case logger_system package name consistently, matching the established vcpkg PACKAGE_NAME convention.

Changes

  • cmake/monitoring_system-config.cmake.in: Change find_dependency(LoggerSystem CONFIG)find_dependency(logger_system CONFIG)
  • CMakeLists.txt: Add find_package(logger_system CONFIG QUIET) fallback in the logger discovery block, consistent with how thread_system and network_system are discovered

Why

The logger_system portfile (vcpkg-ports/kcenon-logger-system/portfile.cmake) uses PACKAGE_NAME logger_system (snake_case), but the config template was still calling find_dependency(LoggerSystem CONFIG) (PascalCase). This caused find_package(monitoring_system) to fail for consumers who had logger_system enabled, because CMake would look for a non-existent LoggerSystem package.

Additionally, the logger discovery in CMakeLists.txt had no find_package() fallback — meaning vcpkg-installed logger_system packages would never be found during the initial dependency detection phase.

Relates to #532: Standardize CMake PACKAGE_NAME convention across ecosystem ports

How

Root cause

find_dependency(LoggerSystem CONFIG) in the installed config file caused find_package(monitoring_system) to fail when logger support was enabled and logger_system (snake_case) was installed via vcpkg.

Fix

  1. Align find_dependency call in config template with the portfile's PACKAGE_NAME
  2. Add find_package(logger_system CONFIG QUIET) detection block (matches pattern used by thread_system and network_system)

Testing

  • No build toolchain available locally; CI validation covers all platforms
  • Changes are backward-compatible: candidate list still checks LoggerSystem and LoggerSystem::LoggerSystem for submodule/FetchContent builds

Checklist

  • Config template uses correct snake_case package name
  • find_package fallback added for vcpkg-mode logger discovery
  • No regression for submodule/FetchContent build mode (backward-compatible candidate list)
  • Consistent with thread_system and network_system detection patterns

Closes #532

- Fix cmake/monitoring_system-config.cmake.in to use find_dependency(logger_system)
  instead of find_dependency(LoggerSystem) to match portfile PACKAGE_NAME convention
- Add find_package(logger_system CONFIG QUIET) fallback in CMakeLists.txt logger
  detection block, consistent with thread_system and network_system patterns

Part of #532: Standardize CMake PACKAGE_NAME convention across ecosystem ports
@kcenon kcenon merged commit 3298d5d into main Mar 16, 2026
26 checks passed
@kcenon kcenon deleted the chore/issue-532-chore-deps-standardize-cmake-package-name-conventi branch March 16, 2026 05:42
kcenon added a commit that referenced this pull request Apr 13, 2026
)

- Fix cmake/monitoring_system-config.cmake.in to use find_dependency(logger_system)
  instead of find_dependency(LoggerSystem) to match portfile PACKAGE_NAME convention
- Add find_package(logger_system CONFIG QUIET) fallback in CMakeLists.txt logger
  detection block, consistent with thread_system and network_system patterns

Part of #532: Standardize CMake PACKAGE_NAME convention across ecosystem ports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): Standardize CMake PACKAGE_NAME convention across ecosystem ports

1 participant