Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2008, 10:36:51 PM (15 years ago)
Author:
rgrieder
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/src/orxonox/objects/weaponSystem/CMakeLists.txt

    r2131 r2518  
    1 SET( SRC_FILES
     1ADD_SOURCE_FILES(
    22  Munition.cc
    33  Weapon.cc
     
    77)
    88
    9 #ADD_SOURCE_DIRECTORY(SRC_FILES munitions)
    10 #ADD_SOURCE_DIRECTORY(SRC_FILES projectiles)
    11 #ADD_SOURCE_DIRECTORY(SRC_FILES weapons)
    12 
    13 ADD_SOURCE_FILES(SRC_FILES)
     9#ADD_SOURCE_DIRECTORY(munitions)
     10#ADD_SOURCE_DIRECTORY(projectiles)
     11#ADD_SOURCE_DIRECTORY(weapons)
Note: See TracChangeset for help on using the changeset viewer.