I messed it up for lines 41-43, that doesn't make sense.

Line 36 clears the effect of any previous include_directories, and it was intended. If ${NAME}_INCLUDE_DIRECTORIES is provided it's not needed, and if it isn't given most probably it will break existing projects. I'll follow your suggestion with an additional change.