cmake: Fix --find-package mode with imported targets
A change in !829 (merged) accidentally left project commands out of find-package mode, causing packages that provide imported targets to break.
Fixes: #17124 (closed)
A change in !829 (merged) accidentally left project commands out of find-package mode, causing packages that provide imported targets to break.
Fixes: #17124 (closed)