1
0
Fork 0
flightgear/src/CMakeLists.txt
Florent Rougon 48f52f14c4 Improved infrastructure for add-ons: C++ classes, metadata file, Nasal interface
This commit adds C++ classes for add-on management, most notably
AddonManager, Addon and AddonVersion. The AddonManager is used to
register add-ons. It relies on an std::map<std::string, AddonRef> to
hold the metadata of each registered add-on (keys of the std::map are
add-on identifiers, and AddonRef is currently SGSharedPtr<Addon>).
Accessor methods are available for:

  - retrieving the list of registered or loaded add-ons (terminology
    explained in $FG_ROOT/Docs/README.add-ons);

  - checking if a particular add-on has already been registered or
    loaded;

  - for each add-on, obtaining an Addon instance which can be queried
    for its name, id, version, base path, the minimum and maximum
    FlightGear versions it requires, its base node in the Property Tree,
    its order in the load sequence, short and long description strings,
    home page, etc.

The most important metadata is made accessible in the Property Tree
under /addons/by-id/<addon-id> and the property
/addons/by-id/<addon-id>/loaded can be checked or listened to, in
order to determine when a particular add-on is loaded. There is also a
Nasal interface to access add-on metadata in a convenient way.

In order to provide this metadata, each add-on must from now on have in
its base directory a file called 'addon-metadata.xml'.

All this is documented in much more detail in
$FG_ROOT/Docs/README.add-ons.

Mailing-list discussion:

  https://sourceforge.net/p/flightgear/mailman/message/36146017/
2017-12-08 00:36:41 +01:00

39 lines
531 B
CMake

include_directories(${PROJECT_SOURCE_DIR})
# note order here affects link order, and hence linking correctness
# on systems with a traditional ld (eg, GNU ld on Linux)
foreach( mylibfolder
Add-ons
Airports
Aircraft
ATC
EmbeddedResources
Canvas
Radio
Autopilot
Cockpit
Environment
GUI
Input
Instrumentation
Model
MultiPlayer
AIModel
Navaids
Network
Scenery
Scripting
Sound
Systems
Time
Traffic
FDM
Viewer
Main
)
add_subdirectory(${mylibfolder})
endforeach( mylibfolder )