Factor project directives into a separate macro