Tests: Fix CMakeCommands.target_link_directories for regex chars in path

Fixes: #22801
1 file changed