Do not use PROJECT_BINARY_DIR before it is defined. If it is not defined when needed, fail with an error message suggesting that the project() command be invoked first.