mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
CMake - Made it easier to add your custom scripts (#703)
This commit is contained in:
@@ -6,14 +6,20 @@ They will be git-ignored
|
||||
Remember to use cmake macro inside your CMakeLists.txt to correctly
|
||||
add scripts to project solution.
|
||||
|
||||
BTW, **We strongly suggest you** to use our module system to create your custom
|
||||
|
||||
|
||||
/!\ BTW, **We strongly suggest you** to use our module system to create your custom
|
||||
powerful module instead of simple scripts.
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------
|
||||
CMakeLists.txt example:
|
||||
How to:
|
||||
|
||||
1) Create a CMakeLists.txt in this directory
|
||||
|
||||
Example (everything below is needed, just replace with your scripts' names):
|
||||
|
||||
set(scripts_STAT_SRCS
|
||||
${scripts_STAT_SRCS}
|
||||
@@ -24,3 +30,8 @@ set(scripts_STAT_SRCS
|
||||
AC_ADD_SCRIPT_LOADER("Custom" "ScriptLoader.h")
|
||||
|
||||
message(" -> Prepared: My custom scripts")
|
||||
|
||||
|
||||
2) Add them to ../ScriptLoader.cpp
|
||||
|
||||
Open the file and go at the end of the file to know what to edit.
|
||||
|
||||
@@ -1171,3 +1171,15 @@ void AddOutdoorPvPScripts()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//~ ********************** Put your custom scripts below, like the commented examples, uncomment and edit *************************************
|
||||
|
||||
|
||||
//~ void AddSC_MySuperScript();
|
||||
|
||||
void AddCustomScripts()
|
||||
{
|
||||
#ifdef SCRIPTS
|
||||
//~ AddSC_MySuperScript();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user