| 82 | | Open the CMakeLists.txt file in the src/orxonox folder and add the path to your header file to the GENERATE_TOLUA_BINDINGS command. |
| | 82 | Depending which class you want to make available for tolua++ you have to edit different ''CMakeList.txt'' files: Is your class part of a library we link with Orxonox, you should find the ORXONOX_ADD_LIBRARY command in one of the top ''CMakeList.txt'' files. Is the class part of the main application (inside src/orxonox/*), you need to find the ORXONOX_ADD_EXECUTABLE command in ''src/orxonox/CMakeList.txt''. |
| | 83 | |
| | 84 | Regardless which command or ''CMakeList.txt'' file you use, you have to add the relative path of your class to the list after the TOLUA_FILES flag inside the cMake command. Example: |
| | 85 | {{{ |
| | 86 | ORXONOX_ADD_EXECUTABLE(orxonox |
| | 87 | FIND_HEADER_FILES |
| | 88 | TOLUA_FILES |
| | 89 | gui/GUIManager.h |
| | 90 | objects/pickup/PickupInventory.h |
| | 91 | objects/quest/QuestDescription.h |
| | 92 | <<<----- put your new class here |
| | 93 | ... |
| | 94 | LINK_LIBRARIES |
| | 95 | ${OGRE_LIBRARY} |
| | 96 | ... |
| | 97 | util |
| | 98 | core |
| | 99 | network |
| | 100 | SOURCE_FILES ${ORXONOX_SRC_FILES} |
| | 101 | ) |
| | 102 | }}} |