Simplify plugin localization by creating a custom cmake function