-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added meson build files (#1) * Added meson build files * Added precisions about including the examples folder * add optional dependencies (#2) * add optional dependencies * sdl, vulkan, glut, glfw * TODO add the other deps like opengl, dx9, ... * inline dependencies * Use consistent indentation, add missing commas to the list Co-authored-by: Lisa White <[email protected]> * minor bumb to 1.78 and changed dependency sdl to sdl2 * fixed option name error Co-authored-by: Tommy-Xavier Robillard <[email protected]> Co-authored-by: Andreas Stallinger <[email protected]> Co-authored-by: Lisa White <[email protected]>
- Loading branch information
1 parent
c2acde3
commit 6417e39
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
project('imgui', 'cpp', | ||
version: '1.78', | ||
license: 'MIT', | ||
) | ||
|
||
# Folder `examples` is needed, as it includes | ||
# the implementations for different rendering backends and | ||
# context creation APIs | ||
include_dirs = include_directories('.', 'examples') | ||
|
||
sources = ['imgui_demo.cpp', 'imgui_draw.cpp', 'imgui_widgets.cpp', 'imgui.cpp'] | ||
if get_option('opengl3').enabled() | ||
sources += 'examples/imgui_impl_opengl3.cpp' | ||
endif | ||
if get_option('dx12').enabled() | ||
sources += 'examples/imgui_impl_dx12.cpp' | ||
endif | ||
if get_option('dx9').enabled() | ||
sources += 'examples/imgui_impl_dx9.cpp' | ||
endif | ||
if get_option('opengl2').enabled() | ||
sources += 'examples/imgui_impl_opengl2.cpp' | ||
endif | ||
if get_option('glut').enabled() | ||
sources += 'examples/imgui_impl_glut.cpp' | ||
endif | ||
if get_option('dx11').enabled() | ||
sources += 'examples/imgui_impl_dx11.cpp' | ||
endif | ||
if get_option('win32').enabled() | ||
sources += 'examples/imgui_impl_win32.cpp' | ||
endif | ||
if get_option('sdl2').enabled() | ||
sources += 'examples/imgui_impl_sdl.cpp' | ||
endif | ||
if get_option('glfw').enabled() | ||
sources += 'examples/imgui_impl_glfw.cpp' | ||
endif | ||
if get_option('dx10').enabled() | ||
sources += 'examples/imgui_impl_dx10.cpp' | ||
endif | ||
if get_option('allegro5').enabled() | ||
sources += 'examples/imgui_impl_allegro5.cpp' | ||
endif | ||
if get_option('vulkan').enabled() | ||
sources += 'examples/imgui_impl_vulkan.cpp' | ||
endif | ||
if get_option('marmalade').enabled() | ||
sources += 'examples/imgui_impl_marmalade.cpp' | ||
endif | ||
if get_option('osx').enabled() | ||
sources += 'examples/imgui_impl_osx.mm' | ||
endif | ||
if get_option('metal').enabled() | ||
sources += 'examples/imgui_impl_metal.mm' | ||
endif | ||
|
||
imgui = library('imgui', | ||
sources, | ||
dependencies: [ | ||
# TODO: add other dependencies | ||
dependency('vulkan', required: get_option('vulkan')), | ||
dependency('glfw3', required: get_option('glfw')), | ||
dependency('sdl2', required: get_option('sdl2')), | ||
dependency('glut', required: get_option('glut')), | ||
], | ||
include_directories: include_dirs, | ||
) | ||
|
||
imgui_dep = declare_dependency(include_directories: include_dirs, link_with: imgui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# renderer | ||
option('dx9', type: 'feature', value: 'auto') | ||
option('dx10', type: 'feature', value: 'auto') | ||
option('dx11', type: 'feature', value: 'auto') | ||
option('dx12', type: 'feature', value: 'auto') | ||
option('metal', type: 'feature', value: 'auto') | ||
option('opengl2', type: 'feature', value: 'auto') | ||
option('opengl3', type: 'feature', value: 'auto') | ||
option('vulkan', type: 'feature', value: 'auto') | ||
|
||
#platform | ||
option('glfw', type: 'feature', value: 'auto') | ||
option('osx', type: 'feature', value: 'auto') | ||
option('sdl2', type: 'feature', value: 'auto') | ||
option('win32', type: 'feature', value: 'auto') | ||
option('glut', type: 'feature', value: 'auto') | ||
|
||
#frameworks | ||
option('marmalade', type: 'feature', value: 'auto') | ||
option('allegro5', type: 'feature', value: 'auto') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[wrap-file] | ||
directory = imgui-1.78 | ||
|
||
source_url = https://github.com/ocornut/imgui/archive/v1.78.tar.gz | ||
source_filename = v1.78.tar.gz | ||
source_hash = f70bbb17581ee2bd42fda526d9c3dc1a5165f3847ff047483d4d7980e166f9a3 | ||
|