Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/core/CMakeLists.txt @ 2505

Last change on this file since 2505 was 2131, checked in by rgrieder, 16 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
RevLine 
[1505]1SET(CORE_SRC_FILES
[1755]2  Clock.cc
[1505]3  ConfigFileManager.cc
4  ConfigValueContainer.cc
[1535]5  Core.cc
[2087]6  Event.cc
[1755]7  GameState.cc
[1543]8  Language.cc
[2087]9  LuaBind.cc
[1747]10  ObjectListBase.cc
[1543]11  OrxonoxClass.cc
[1755]12  RootGameState.cc
[1543]13
14  # command
15  ArgumentCompletionFunctions.cc
16  CommandEvaluation.cc
[1505]17  CommandExecutor.cc
[1755]18  CommandLine.cc
[1505]19  ConsoleCommand.cc
20  ConsoleCommandCompilation.cc
[1543]21  Executor.cc
22
23  # hierarchy
24  Factory.cc
25  Identifier.cc
26  MetaObjectList.cc
27
28  # level
29  BaseObject.cc
30  ClassTreeMask.cc
[1505]31  Loader.cc
32  Namespace.cc
33  NamespaceNode.cc
[2087]34  Template.cc
[1543]35  XMLPort.cc
[2087]36  XMLNameListener.cc
[1543]37
38  # shell
39  IRC.cc
40  Shell.cc
[1505]41  TclBind.cc
42  TclThreadManager.cc
[1535]43
[1505]44  tolua/tolua_bind.cc
45)
46
[2131]47ADD_SOURCE_DIRECTORY(CORE_SRC_FILES input)
48
[1810]49GET_TARGET_PROPERTY(TOLUA_EXE tolua_orxonox LOCATION)
[1505]50ADD_CUSTOM_COMMAND(
[1843]51  OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.cc ${CMAKE_CURRENT_SOURCE_DIR}/tolua/tolua_bind.h
[1755]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
[1815]53  DEPENDS
54    tolua_orxonox
55    tolua/tolua.pkg
[2087]56    LuaBind.h
[1815]57    CommandExecutor.h
[1505]58  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/lib
59)
60
61ADD_LIBRARY(core SHARED ${CORE_SRC_FILES})
62
63TARGET_LINK_LIBRARIES(core
64  ${OGRE_LIBRARIES}
[1844]65  ${Boost_thread_LIBRARIES}
66  ${Boost_filesystem_LIBRARIES}
[1810]67  lua_orxonox
68  cpptcl_orxonox
[1555]69  ois_orxonox
[1810]70  tinyxml_orxonox
71  tolualib_orxonox
[1505]72  util
73)
Note: See TracBrowser for help on using the repository browser.