from include_directories("${CMAKE_CURRENT_BINARY_DIR}")
I was debugging why no directory I specify in target_include_directories allow me to access the header after generate_export_header, even when explicitly specifying EXPORT_FILE_NAME and using angle brackets (with different path relativity).
One thing I finally tried was to output to ${CMAKE_CURRENT_BINARY_DIR}/${LIBRARY_NAME}_export.h and adding that directory to the global search with include_directories. That’s when this error occurred. I’m assuming the error should be a different one (if an error at all).