generate_export_header in project with C and CXX languages always goes CXX
I have a project with C and CXX.
project(pp VERSION 0.0.0 LANGUAGES C CXX)
I'm careful to make all the headers .h and fully C compatible (with `` and all). Even guarding them with:
#ifdef __cplusplus
extern "C" {
#endif
But the newly C-compatible generate_export_header
always generates CXX headers even when the target has this explicitly:
set_target_properties("${LIBRARY_NAME}" PROPERTIES LINKER_LANGUAGE C)
Only just realised that my linker issues [MSVC only: undefined extern] are from an incorrectly generated export header.
For now I'll commit a generated header to version-control and use that on MSVC, but if you could fix this on CMake's end that would be great. Thanks