That will work in the OP’s literal case, where the variable is set to its final value before the target_include_directories() call, and in the same scope. If that mirrors the OP’s real use case, it’s perfectly fine.
It wouldn’t work if in the real code, the variable could be set later/elsewhere, or change value after the target_include_directories() call. In such case, setting a property on a target (as the OP is currently doing) is the only way to make it work of which I know, and I use the same approach in our projects at work.