[client] added options to disable/enable interfaces

This commit is contained in:
Geoffrey McRae 2019-03-28 20:12:18 +11:00
parent 3e021f3a6b
commit 66c3c0115f
5 changed files with 20 additions and 10 deletions

View File

@ -1 +1 @@
a12-118-gb524c077a4+1
a12-119-g3e021f3a6b+1

View File

@ -14,6 +14,10 @@ if(OPTIMIZE_FOR_NATIVE)
endif()
endif()
option(ENABLE_OPENGL "Enable the OpenGL renderer" ON)
option(ENABLE_EGL "Enable the EGL renderer" ON)
option(ENABLE_CB_X11 "Enable X11 clipboard integration" ON)
add_compile_options(
"-Wall"
"-Werror"

View File

@ -10,8 +10,8 @@ file(APPEND ${CLIPBOARD_H} "extern LG_Clipboard * LG_Clipboards[];\n\n")
file(WRITE ${CLIPBOARD_C} "#include \"interface/clipboard.h\"\n\n")
file(APPEND ${CLIPBOARD_C} "#include <stddef.h>\n\n")
set(CLIPBOARDS)
set(CLIPBOARDS_LINK)
set(CLIPBOARDS "_")
set(CLIPBOARDS_LINK "_")
function(add_clipboard name)
set(CLIPBOARDS "${CLIPBOARDS};${name}" PARENT_SCOPE)
set(CLIPBOARDS_LINK "${CLIPBOARDS_LINK};clipboard_${name}" PARENT_SCOPE)
@ -19,7 +19,9 @@ function(add_clipboard name)
endfunction()
# Add/remove clipboards here!
add_clipboard(X11)
if (ENABLE_CB_X11)
add_clipboard(X11)
endif()
list(REMOVE_AT CLIPBOARDS 0)
list(REMOVE_AT CLIPBOARDS_LINK 0)

View File

@ -10,8 +10,8 @@ file(APPEND ${FONT_H} "extern LG_Font * LG_Fonts[];\n\n")
file(WRITE ${FONT_C} "#include \"interface/font.h\"\n\n")
file(APPEND ${FONT_C} "#include <stddef.h>\n\n")
set(FONTS)
set(FONTS_LINK)
set(FONTS "_")
set(FONTS_LINK "_")
function(add_font name)
set(FONTS "${FONTS};${name}" PARENT_SCOPE)
set(FONTS_LINK "${FONTS_LINK};font_${name}" PARENT_SCOPE)

View File

@ -10,8 +10,8 @@ file(APPEND ${RENDERER_H} "extern LG_Renderer * LG_Renderers[];\n\n")
file(WRITE ${RENDERER_C} "#include \"interface/renderer.h\"\n\n")
file(APPEND ${RENDERER_C} "#include <stddef.h>\n\n")
set(RENDERERS)
set(RENDERERS_LINK)
set(RENDERERS "_")
set(RENDERERS_LINK "_")
function(add_renderer name)
set(RENDERERS "${RENDERERS};${name}" PARENT_SCOPE)
set(RENDERERS_LINK "${RENDERERS_LINK};renderer_${name}" PARENT_SCOPE)
@ -19,8 +19,12 @@ function(add_renderer name)
endfunction()
# Add/remove renderers here!
add_renderer(EGL)
add_renderer(OpenGL)
if(ENABLE_EGL)
add_renderer(EGL)
endif()
if (ENABLE_OPENGL)
add_renderer(OpenGL)
endif()
list(REMOVE_AT RENDERERS 0)
list(REMOVE_AT RENDERERS_LINK 0)