Added recipe for ImGui Node Editor.
This commit is contained in:
parent
5159c80167
commit
2cc3145669
46
recipes/imgui-node-editor/recipe.py
Normal file
46
recipes/imgui-node-editor/recipe.py
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
|
||||
import re
|
||||
from SCons.Script import *
|
||||
|
||||
|
||||
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||
ine_source_files = [
|
||||
os.path.join(repo['checkout_root'], 'crude_json.cpp'),
|
||||
os.path.join(repo['checkout_root'], 'imgui_canvas.cpp'),
|
||||
os.path.join(repo['checkout_root'], 'imgui_node_editor.cpp'),
|
||||
os.path.join(repo['checkout_root'], 'imgui_node_editor_api.cpp')
|
||||
]
|
||||
|
||||
|
||||
ccflags = list(env['CCFLAGS'])
|
||||
if env['COMPILER_FAMILY'] == 'cl':
|
||||
ccflags.append('/wd4100')
|
||||
lib_ine = env.StaticLibrary(
|
||||
CPPPATH = [repo['checkout_root']],
|
||||
CCFLAGS = ccflags,
|
||||
target = env['LIB_DIR'] + '/imgui_node_editor',
|
||||
source = ine_source_files,
|
||||
dependencies = {
|
||||
'imgui': {
|
||||
'min': (1, 72, 0)
|
||||
}
|
||||
}
|
||||
)
|
||||
return {
|
||||
'CPPPATH': [repo['checkout_root']],
|
||||
'LIBS': [lib_ine]
|
||||
}
|
||||
|
||||
|
||||
env.GitRecipe(
|
||||
globals = globals(),
|
||||
repo_name = 'imgui-node-editor',
|
||||
repo_url = 'https://github.com/thedmd/imgui-node-editor.git',
|
||||
tag_pattern = re.compile(r'^v([0-9]+)\.([0-9]+)\.([0-9]+)$'),
|
||||
tag_fn = lambda version: f'v{version[0]}.{version[1]}.{version[2]}',
|
||||
cook_fn = _git_cook,
|
||||
dependencies = {
|
||||
'imgui': {}
|
||||
}
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user