Core: Add flags.h generated file

This commit is contained in:
Jeffrey Pfau 2016-10-28 00:33:47 -07:00
parent e2bcd2e05a
commit 7bd5ae9a70
2 changed files with 91 additions and 0 deletions

View File

@ -151,6 +151,9 @@ add_custom_target(version-info ALL
include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/core/flags.h.in ${CMAKE_CURRENT_BINARY_DIR}/flags.h)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/flags.h DESTINATION include/mgba COMPONENT lib${BINARY_NAME})
list(APPEND UTIL_SRC ${CMAKE_CURRENT_BINARY_DIR}/version.c)
source_group("Generated sources" FILES ${CMAKE_CURRENT_BINARY_DIR}/version.c)

88
src/core/flags.h.in Normal file
View File

@ -0,0 +1,88 @@
#ifndef FLAGS_H
#define FLAGS_H
#ifndef MINIMAL_CORE
#cmakedefine MINIMAL_CORE @MINIMAL_CORE@
#endif
// BUILD flags
#ifndef BUILD_GL
#cmakedefine BUILD_GL
#endif
#ifndef BUILD_GLES2
#cmakedefine BUILD_GLES2
#endif
// COLOR flags
#ifndef COLOR_16_BIT
#cmakedefine COLOR_16_BIT
#endif
#ifndef COLOR_5_6_5
#cmakedefine COLOR_5_6_5
#endif
// M_CORE flags
#ifndef M_CORE_GBA
#cmakedefine M_CORE_GBA
#endif
#ifndef M_CORE_GB
#cmakedefine M_CORE_GB
#endif
// USE flags
#ifndef USE_EDITLINE
#cmakedefine USE_EDITLINE
#endif
#ifndef USE_EPOXY
#cmakedefine USE_EPOXY
#endif
#ifndef USE_FFMPEG
#cmakedefine USE_FFMPEG
#endif
#ifndef USE_GDB_STUB
#cmakedefine USE_GDB_STUB
#endif
#ifndef USE_LIBAV
#cmakedefine USE_LIBAV
#endif
#ifndef USE_LIBZIP
#cmakedefine USE_LIBZIP
#endif
#ifndef USE_LZMA
#cmakedefine USE_LZMA
#endif
#ifndef USE_MAGICK
#cmakedefine USE_MAGICK
#endif
#ifndef USE_MINIZIP
#cmakedefine USE_MINIZIP
#endif
#ifndef USE_PNG
#cmakedefine USE_PNG
#endif
#ifndef USE_PTHREADS
#cmakedefine USE_PTHREADS
#endif
#ifndef USE_ZLIB
#cmakedefine USE_ZLIB
#endif
#endif