| Last change
                  on this file since 2792 was
                  2131,
                  checked in by rgrieder, 17 years ago | 
        
          | 
Added CMakeLists.txt to every subfolder and adjusted accordingly.The CMake script I have written can be used as follows:
 ADD_SOURCE_DIRECTORY(_source_list directory)  # Adds a new source subdirectory where _source_list is the name of the source list in CURRENT folder
 ADD_SOURCE_FILES(_source_list)  # Adds the source files in a subdirectory to the source list in the super directory (has to be called!)
 
 
Note: When adding more subdirectories in a subdirectory, call ADD_SOURCE_FILES after ADD_SOURCE_DIRECTORY!
 | 
        
          | 
              
                  Property svn:eol-style set to
                  native | 
        | File size:
            1.4 KB | 
      
      
        
  | Line |  | 
|---|
| 1 | SET(CORE_SRC_FILES | 
|---|
| 2 | Clock.cc | 
|---|
| 3 | ConfigFileManager.cc | 
|---|
| 4 | ConfigValueContainer.cc | 
|---|
| 5 | Core.cc | 
|---|
| 6 | Event.cc | 
|---|
| 7 | GameState.cc | 
|---|
| 8 | Language.cc | 
|---|
| 9 | LuaBind.cc | 
|---|
| 10 | ObjectListBase.cc | 
|---|
| 11 | OrxonoxClass.cc | 
|---|
| 12 | RootGameState.cc | 
|---|
| 13 |  | 
|---|
| 14 | # command | 
|---|
| 15 | ArgumentCompletionFunctions.cc | 
|---|
| 16 | CommandEvaluation.cc | 
|---|
| 17 | CommandExecutor.cc | 
|---|
| 18 | CommandLine.cc | 
|---|
| 19 | ConsoleCommand.cc | 
|---|
| 20 | ConsoleCommandCompilation.cc | 
|---|
| 21 | Executor.cc | 
|---|
| 22 |  | 
|---|
| 23 | # hierarchy | 
|---|
| 24 | Factory.cc | 
|---|
| 25 | Identifier.cc | 
|---|
| 26 | MetaObjectList.cc | 
|---|
| 27 |  | 
|---|
| 28 | # level | 
|---|
| 29 | BaseObject.cc | 
|---|
| 30 | ClassTreeMask.cc | 
|---|
| 31 | Loader.cc | 
|---|
| 32 | Namespace.cc | 
|---|
| 33 | NamespaceNode.cc | 
|---|
| 34 | Template.cc | 
|---|
| 35 | XMLPort.cc | 
|---|
| 36 | XMLNameListener.cc | 
|---|
| 37 |  | 
|---|
| 38 | # shell | 
|---|
| 39 | IRC.cc | 
|---|
| 40 | Shell.cc | 
|---|
| 41 | TclBind.cc | 
|---|
| 42 | TclThreadManager.cc | 
|---|
| 43 |  | 
|---|
| 44 | tolua/tolua_bind.cc | 
|---|
| 45 | ) | 
|---|
| 46 |  | 
|---|
| 47 | ADD_SOURCE_DIRECTORY(CORE_SRC_FILES input) | 
|---|
| 48 |  | 
|---|
| 49 | GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION) | 
|---|
| 50 | ADD_CUSTOM_COMMAND( | 
|---|
| 51 | OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.cc ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.h | 
|---|
| 52 | COMMAND ${TOLUA_EXE} -n Core -o ../../src/core/tolua/tolua_bind.cc -H ../../src/core/tolua/tolua_bind.h ../../src/core/tolua/tolua.pkg | 
|---|
| 53 | DEPENDS | 
|---|
| 54 | tolua_orxonox | 
|---|
| 55 | tolua/tolua.pkg | 
|---|
| 56 | LuaBind.h | 
|---|
| 57 | CommandExecutor.h | 
|---|
| 58 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib | 
|---|
| 59 | ) | 
|---|
| 60 |  | 
|---|
| 61 | ADD_LIBRARY(core SHARED ${CORE_SRC_FILES}) | 
|---|
| 62 |  | 
|---|
| 63 | TARGET_LINK_LIBRARIES(core | 
|---|
| 64 | ${OGRE_LIBRARIES} | 
|---|
| 65 | ${Boost_thread_LIBRARIES} | 
|---|
| 66 | ${Boost_filesystem_LIBRARIES} | 
|---|
| 67 | lua_orxonox | 
|---|
| 68 | cpptcl_orxonox | 
|---|
| 69 | ois_orxonox | 
|---|
| 70 | tinyxml_orxonox | 
|---|
| 71 | tolualib_orxonox | 
|---|
| 72 | util | 
|---|
| 73 | ) | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.