ExternalProject: BUILD_BYPRODUCTS not hooked to IMPORTED_LOCATION
I think this is a fairly minimal example. In this setup, you would expect the file libarrow.a to be required for the library target arrow, but in fact no edge exists between them, and CMake will complain that it has no rule to build libarrow.a.
set(ARROW_LIBRARIES ${CMAKE_BINARY_DIR}/arrow/install/lib/libarrow.a)
ExternalProject_Add(arrow-build
PREFIX arrow
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/vendor/arrow/cpp
STEP_TARGETS build
BUILD_BYPRODUCTS ${ARROW_LIBRARIES}
)
add_library(arrow STATIC IMPORTED)
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION ${ARROW_LIBRARIES})
This issue is present as of 3.25.1.