Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/core/CMakeLists.txt @ 2518

Last change on this file since 2518 was 2518, checked in by rgrieder, 15 years ago

Adjusted source file macros to cmake 2.6 because it offers PARENT_SCOPE variable setting which removes my little hack with the CMake cache.
Also notice that the syntax has changed:

ADD_SOURCE_FILES(

Blubb.cc
Asdf.cc

)
ADD_SOURCE_DIRECTORY(ford_prefect)

These two commands can be written in an arbitrary order.
To actually use the created list of souce files, there is a third macro:
WRITE_SOURCE_FILES(myVariableName)

A demonstration can be found by looking at src/orxonox/CMakeLists.txt and src/orxonox/objects/CMakeLists.txt

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1ADD_SOURCE_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
45ADD_SOURCE_DIRECTORY(input)
46
47WRITE_SOURCE_FILES(CORE_SRC_FILES)
48
49INCLUDE(UseTolua)
50TOLUA(Core CORE_SRC_FILES INPUTFILES LuaBind.h CommandExecutor.h)
51
52ADD_LIBRARY(core SHARED ${CORE_SRC_FILES})
53
54TARGET_LINK_LIBRARIES(core
55  ${OGRE_LIBRARY}
56  ${Boost_THREAD_LIBRARY}
57  ${Boost_FILESYSTEM_LIBRARY}
58  ${LUA_LIBRARIES}
59  cpptcl_orxonox
60  ois_orxonox
61  tinyxml_orxonox
62  tolualib_orxonox
63  util
64)
65
66INSTALL(TARGETS core LIBRARY DESTINATION lib)
Note: See TracBrowser for help on using the repository browser.