Skip to content

Fix CMP0175 warnings in CMakeLists.txt add_custom_command calls #10

@ayrtondenner

Description

@ayrtondenner

Description

The add_custom_command(TARGET ...) calls in CMakeLists.txt (lines 222-240) for the format-xml, format-fonts, format-forms, and format-aliases targets have two issues:

  1. Missing POST_BUILD — The TARGET form requires exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD
  2. Unsupported DEPENDS — The DEPENDS keyword is only valid in the output form of add_custom_command, not the TARGET form

This causes ~100+ CMP0175 policy warnings during CMake generation with newer CMake versions.

Additional build improvements to evaluate

These were identified during local build setup and may be worth contributing upstream:

  • vcpkg auto-detection: Add VCPKG_ROOT environment variable auto-detection in CMakeLists.txt so CMAKE_TOOLCHAIN_FILE doesn't need to be manually specified when VCPKG_ROOT is set
  • builtin-baseline in vcpkg.json: Add a baseline hash so vcpkg can resolve package versions without requiring manifest mode flags

These should be evaluated carefully before submitting upstream, as they change the build configuration for all contributors.

Fix for CMP0175

  • Add POST_BUILD to each add_custom_command(TARGET ...) call
  • Remove DEPENDS ${FILE} from each call

References

Metadata

Metadata

Assignees

Labels

codingCode changes and fixes

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions