Added script for generating modules.
This commit is contained in:
17
tools/templates/module/app/private/SModule.jinja
Normal file
17
tools/templates/module/app/private/SModule.jinja
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Import('env')
|
||||
|
||||
src_files = Split("""
|
||||
main.cpp
|
||||
""")
|
||||
|
||||
prog_app = env.UnityProgram(
|
||||
name = '{{name}}',
|
||||
target = env['BIN_DIR'] + '/{{target_name}}',
|
||||
source = src_files,
|
||||
dependencies = {
|
||||
'mijin': {}
|
||||
}
|
||||
)
|
||||
|
||||
Return('env')
|
||||
5
tools/templates/module/app/private/main.cpp
Normal file
5
tools/templates/module/app/private/main.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
17
tools/templates/module/library/config.json
Normal file
17
tools/templates/module/library/config.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"options": [
|
||||
{
|
||||
"name": "library_type",
|
||||
"message": "Enter library type.",
|
||||
"type": "choices",
|
||||
"choices": ["static", "shared"]
|
||||
}
|
||||
],
|
||||
"new_sources": [
|
||||
{
|
||||
"header": "public",
|
||||
"source": true,
|
||||
"path": "{{folder_name}}/{{target_name}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
17
tools/templates/module/library/private/SModule.jinja
Normal file
17
tools/templates/module/library/private/SModule.jinja
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Import('env')
|
||||
|
||||
src_files = Split("""
|
||||
{{target_name}}.cpp
|
||||
""")
|
||||
|
||||
env.Unity{% if library_type == "shared" %}Shared{% else %}Static{% endif %}Library(
|
||||
name = '{{name}}',
|
||||
target = env['LIB_DIR'] + '/{{target_name}}',
|
||||
source = src_files,
|
||||
dependencies = {
|
||||
'mijin': {}
|
||||
}
|
||||
)
|
||||
|
||||
Return('env')
|
||||
Reference in New Issue
Block a user