ogg icon indicating copy to clipboard operation
ogg copied to clipboard

Workaround for config_types.h.in to use CMake and configure side-by-side

Open botanegg opened this issue 4 years ago • 0 comments

Init INCLUDE_INTTYPES_H, INCLUDE_STDINT_H, INCLUDE_SYS_TYPES_H, CMake variables as 0

It is need to prevent generate broken code in config_types.h So next code was genarated before (e.g. for Android SDK)

#define INCLUDE_INTTYPES_H
...
#if INCLUDE_INTTYPES_H
...
#endif

And got error: expected value in expression (in third line)

After this changes code will be

#define INCLUDE_INTTYPES_H 0
...
#if INCLUDE_INTTYPES_H
...
#endif

This changes seems like a smelt code, but it need to compatibility with configure script To avoid this workaround we can use cmake-specific directive #cmakedefine01 in config_types.h.in configure_file man

botanegg avatar Oct 09 '21 22:10 botanegg