[Core/Cmake] Scripts are now added dynamically

You can now add your scripts using cmake inside your module
instead patch core cpp files
This commit is contained in:
Yehonal
2016-08-07 12:21:52 +02:00
parent e72b8ac1cc
commit 1aef789c85
18 changed files with 101 additions and 96 deletions

View File

@@ -37,8 +37,8 @@ MACRO(AZTH_ADD_GLOBAL name val)
AZTH_GET_GLOBAL(${name})
set_property ( GLOBAL PROPERTY ${name}
${val}
${${name}}
${val}
)
# after set , create the variable for current scope
AZTH_GET_GLOBAL(${name})
@@ -68,6 +68,21 @@ MACRO(AZTH_SET_PATH name val)
AZTH_ADD_INC_PATH(${val})
ENDMACRO()
#
# AZTH_ADD_SCRIPTS
#
MACRO(AZTH_ADD_SCRIPTS script_def include)
AZTH_ADD_GLOBAL("AZTH_ADD_SCRIPTS_LIST" "Add${script_def}Scripts()\;")
if (NOT ${include} STREQUAL "")
AZTH_GET_GLOBAL("AZTH_ADD_SCRIPTS_INCLUDE")
if (NOT ";${AZTH_ADD_SCRIPTS_INCLUDE};" MATCHES ";${include};")
AZTH_ADD_GLOBAL("AZTH_ADD_SCRIPTS_INCLUDE" "${include}\;")
endif()
endif()
ENDMACRO()
#
# AZTH_ADD_INC_PATH
#