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:
- Missing
POST_BUILD — The TARGET form requires exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD
- 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
Description
The
add_custom_command(TARGET ...)calls inCMakeLists.txt(lines 222-240) for theformat-xml,format-fonts,format-forms, andformat-aliasestargets have two issues:POST_BUILD— The TARGET form requires exactly one ofPRE_BUILD,PRE_LINK, orPOST_BUILDDEPENDS— TheDEPENDSkeyword is only valid in the output form ofadd_custom_command, not the TARGET formThis causes ~100+
CMP0175policy 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_ROOTenvironment variable auto-detection inCMakeLists.txtsoCMAKE_TOOLCHAIN_FILEdoesn't need to be manually specified whenVCPKG_ROOTis setbuiltin-baselineinvcpkg.json: Add a baseline hash so vcpkg can resolve package versions without requiring manifest mode flagsThese should be evaluated carefully before submitting upstream, as they change the build configuration for all contributors.
Fix for CMP0175
POST_BUILDto eachadd_custom_command(TARGET ...)callDEPENDS ${FILE}from each callReferences
CMakeLists.txtlines 219-243