add_custom_command: dependency on macOS framework target broken
Building this example on macOS with Ninja:
add_library(mac_fw SHARED mac_fw.c)
set_target_properties(mac_fw PROPERTIES
FRAMEWORK 1
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib
)
add_custom_command(OUTPUT mac_fw.txt COMMAND ${CMAKE_COMMAND} -E touch mac_fw.txt DEPENDS mac_fw)
add_custom_target(drive_mac_fw ALL DEPENDS mac_fw.txt)
fails with
ninja: error: 'lib/mac_fw.framework/mac_fw', needed by 'mac_fw.txt', missing and no known rule to make it