There's no need to stringify the values, but instead just pass in
strings. The core problem is that the path may have tokens which are
replaced by the preprocessor which causes an invalid path to be used.
Instead of running many small tests with many cmake projects, simply
compare the generated export header against a reference.
Remove the helper macros and the try_compiles which are duplicates
of the library build tests.