mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 01:53:47 +00:00
[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:
@@ -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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user