Skip to content

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

Description

@kcenon

What

The 8 ecosystem vcpkg ports use inconsistent CMake package names in vcpkg_cmake_config_fixup(), causing find_package() calls to require different naming conventions depending on the package. This also forces downstream CMake code and patches to search multiple target name candidates.

Why

  • Consumers must guess whether to call find_package(common_system) or find_package(LoggerSystem)
  • Patches like fix-common-system-target.patch exist solely because target names vary (common_system, kcenon::common, kcenon::common_system)
  • Logger port manually generates CMake target files because upstream uses a different package name convention
  • Inconsistency increases integration complexity and maintenance burden for every new consumer

Where

Current PACKAGE_NAME mapping

Port PACKAGE_NAME find_package() Style
kcenon-common-system common_system find_package(common_system) snake_case
kcenon-thread-system thread_system find_package(thread_system) snake_case
kcenon-logger-system LoggerSystem find_package(LoggerSystem) PascalCase
kcenon-container-system ContainerSystem find_package(ContainerSystem) PascalCase
kcenon-monitoring-system monitoring_system find_package(monitoring_system) snake_case
kcenon-database-system DatabaseSystem find_package(DatabaseSystem) PascalCase
kcenon-network-system NetworkSystem find_package(NetworkSystem) PascalCase
kcenon-pacs-system pacs_system find_package(pacs_system) snake_case

Related patches caused by this inconsistency

  • fix-common-system-target.patch (database, network) — searches multiple target name candidates
  • fix-unified-deps-target-names.patch (logger) — fixes thread_system package name lookup
  • fix-vcpkg-dependency-discovery.patch (pacs) — adds find_package fallbacks for 5 different packages

How

  1. Choose a single convention: snake_case (matches vcpkg port naming) or PascalCase (matches CMake find_package convention)
  2. Update upstream CMakeLists.txt install/export rules in each repo to use the chosen convention
  3. Update all portfiles to reflect the new PACKAGE_NAME
  4. Remove target-name-search patches that are no longer needed
  5. Update consumer projects' find_package() calls
  6. Document the convention in ecosystem guidelines

Acceptance Criteria

  • All 8 ports use the same PACKAGE_NAME convention
  • All upstream repos updated with consistent install(EXPORT) names
  • Target-name-workaround patches eliminated or reduced
  • Consumer documentation updated with correct find_package() calls
  • No regression in submodule/FetchContent build mode

Metadata

Metadata

Assignees

Labels

area/depsarea/integrationIntegration with other systemspriority/mediumMedium priority - Important but not urgentsize/LLarge - 3-5 days of worktype/choreMaintenance and cleanup tasks

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions