2017-03-21 20:43:42 +00:00
|
|
|
|
|
|
|
set(sources
|
|
|
|
Main/options.cxx
|
|
|
|
Main/fg_commands.cxx
|
|
|
|
Main/fg_props.cxx
|
|
|
|
Main/globals.cxx
|
|
|
|
Main/locale.cxx
|
|
|
|
Main/util.cxx
|
2017-03-27 14:37:54 +00:00
|
|
|
Main/positioninit.cxx
|
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-11-06 12:58:14 +00:00
|
|
|
Add-ons/Addon.cxx
|
|
|
|
Add-ons/AddonManager.cxx
|
|
|
|
Add-ons/AddonVersion.cxx
|
2017-12-14 08:28:11 +00:00
|
|
|
Add-ons/exceptions.cxx
|
2017-03-21 20:43:42 +00:00
|
|
|
Aircraft/controls.cxx
|
|
|
|
Aircraft/FlightHistory.cxx
|
|
|
|
Aircraft/flightrecorder.cxx
|
|
|
|
Aircraft/replay.cxx
|
|
|
|
Autopilot/route_mgr.cxx
|
|
|
|
Airports/airport.cxx
|
|
|
|
Airports/airport.hxx
|
|
|
|
Airports/apt_loader.cxx
|
|
|
|
Airports/airportdynamicsmanager.cxx
|
|
|
|
Airports/airportdynamicsmanager.hxx
|
|
|
|
Airports/dynamicloader.cxx
|
|
|
|
Airports/dynamics.cxx
|
|
|
|
Airports/xmlloader.cxx
|
|
|
|
Airports/runwaybase.cxx
|
|
|
|
Airports/pavement.cxx
|
|
|
|
Airports/parking.cxx
|
|
|
|
Airports/groundnetwork.cxx
|
|
|
|
Airports/gnnode.cxx
|
|
|
|
Airports/runways.cxx
|
|
|
|
Airports/runwayprefs.cxx
|
|
|
|
Airports/runwayprefloader.cxx
|
|
|
|
ATC/CommStation.cxx
|
|
|
|
# ATC/GroundController.cxx
|
|
|
|
# ATC/atc_mgr.cxx
|
|
|
|
Environment/atmosphere.cxx
|
|
|
|
Environment/environment.cxx
|
|
|
|
Environment/environment_mgr.cxx
|
|
|
|
Environment/environment_ctrl.cxx
|
|
|
|
Environment/presets.cxx
|
|
|
|
Environment/gravity.cxx
|
|
|
|
Environment/ridge_lift.cxx
|
|
|
|
Environment/magvarmanager.cxx
|
|
|
|
Navaids/airways.cxx
|
|
|
|
Navaids/fixlist.cxx
|
|
|
|
Navaids/markerbeacon.cxx
|
|
|
|
Navaids/NavDataCache.cxx
|
|
|
|
Navaids/navdb.cxx
|
|
|
|
Navaids/navlist.cxx
|
|
|
|
Navaids/navrecord.cxx
|
|
|
|
Navaids/poidb.cxx
|
|
|
|
Navaids/procedure.cxx
|
|
|
|
Navaids/positioned.cxx
|
|
|
|
Navaids/PositionedOctree.cxx
|
|
|
|
Navaids/routePath.cxx
|
|
|
|
Navaids/route.cxx
|
|
|
|
Navaids/waypoint.cxx
|
|
|
|
Navaids/FlightPlan.cxx
|
|
|
|
Navaids/LevelDXML.cxx
|
|
|
|
Network/HTTPClient.cxx
|
|
|
|
Time/TimeManager.cxx
|
|
|
|
Time/bodysolver.cxx
|
|
|
|
Scripting/NasalSys.cxx
|
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-11-06 12:58:14 +00:00
|
|
|
Scripting/NasalAddons.cxx
|
2017-03-21 20:43:42 +00:00
|
|
|
Scripting/NasalCondition.cxx
|
|
|
|
Scripting/NasalAircraft.cxx
|
|
|
|
Scripting/NasalString.cxx
|
|
|
|
Scripting/NasalPositioned.cxx
|
|
|
|
Scripting/NasalPositioned_cppbind.cxx
|
|
|
|
Scripting/nasal-props.cxx
|
|
|
|
Scripting/NasalSGPath.cxx
|
|
|
|
Scripting/NasalHTTP.cxx
|
|
|
|
Viewer/view.cxx
|
|
|
|
Viewer/viewmgr.cxx
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach(s ${sources})
|
|
|
|
set_property(DIRECTORY APPEND PROPERTY fgtestlib_sources "${CMAKE_SOURCE_DIR}/src/${s}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
set_property(DIRECTORY APPEND PROPERTY fgtestlib_sources "${CMAKE_SOURCE_DIR}/3rdparty/cjson/cJSON.c")
|
|
|
|
|
|
|
|
get_property(fgtestlib_sources DIRECTORY PROPERTY fgtestlib_sources)
|
|
|
|
|
|
|
|
add_library(fgtestlib SHARED ${fgtestlib_sources}
|
|
|
|
unitTestHelpers.cxx
|
|
|
|
testStubs.cxx
|
|
|
|
fake_sgSky.cxx
|
|
|
|
fake_sgPrecipitation.cxx
|
|
|
|
fake_sound.cxx)
|
|
|
|
|
|
|
|
set_target_properties (fgtestlib
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS "FG_TESTLIB"
|
|
|
|
)
|
|
|
|
|
2017-03-26 10:10:15 +00:00
|
|
|
if(FG_HAVE_GPERFTOOLS)
|
2017-03-27 14:37:54 +00:00
|
|
|
target_include_directories(fgtestlib PRIVATE ${GooglePerfTools_INCLUDE_DIR})
|
2017-03-26 10:10:15 +00:00
|
|
|
target_link_libraries(fgtestlib ${GooglePerfTools_LIBRARIES})
|
|
|
|
endif()
|
2017-03-26 11:15:29 +00:00
|
|
|
target_link_libraries(fgtestlib SimGearCore ${PLATFORM_LIBS} ${SQLITE3_LIBRARY})
|
2017-03-21 20:43:42 +00:00
|
|
|
|
|
|
|
add_executable(fgtest fgTestDriver.cxx)
|
|
|
|
target_link_libraries(fgtest fgtestlib)
|
|
|
|
|
2017-03-26 11:15:29 +00:00
|
|
|
macro(flightgear_test name sources)
|
|
|
|
add_executable(${name} ${sources})
|
2017-03-27 14:37:54 +00:00
|
|
|
target_include_directories(${name} PRIVATE ${CMAKE_SOURCE_DIR}/tests)
|
2017-03-26 11:15:29 +00:00
|
|
|
target_link_libraries(${name} fgtestlib)
|
|
|
|
add_test(${name} ${EXECUTABLE_OUTPUT_PATH}/${name})
|
|
|
|
endmacro()
|
2017-03-21 20:43:42 +00:00
|
|
|
|
2017-03-26 11:15:29 +00:00
|
|
|
flightgear_test(test_navs test_navaids2.cxx)
|
|
|
|
flightgear_test(test_flightplan test_flightplan.cxx)
|
2017-06-05 15:18:52 +00:00
|
|
|
|
|
|
|
add_executable(test_ls_matrix test_ls_matrix.cxx ${CMAKE_SOURCE_DIR}/src/FDM/LaRCsim/ls_matrix.c)
|
|
|
|
target_link_libraries(test_ls_matrix SimGearCore)
|
|
|
|
add_test(test_ls_matrix ${EXECUTABLE_OUTPUT_PATH}/test_ls_matrix)
|
2017-06-10 16:27:19 +00:00
|
|
|
|
|
|
|
add_executable(testAeroElement testAeroElement.cxx ${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AeroElement.cxx)
|
|
|
|
target_link_libraries(testAeroElement SimGearCore)
|
|
|
|
add_test(testAeroElement ${EXECUTABLE_OUTPUT_PATH}/testAeroElement)
|
|
|
|
|
|
|
|
add_executable(testAeroMesh testAeroMesh.cxx
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AeroElement.cxx
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AircraftMesh.cxx
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/WakeMesh.cxx
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/AIWake/AIWakeGroup.cxx
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/LaRCsim/ls_matrix.c
|
|
|
|
)
|
|
|
|
set_target_properties (testAeroMesh PROPERTIES COMPILE_DEFINITIONS "FG_TESTLIB")
|
|
|
|
target_include_directories(testAeroMesh PRIVATE ${CMAKE_SOURCE_DIR}/tests
|
|
|
|
${CMAKE_SOURCE_DIR}/src/FDM/JSBSim)
|
|
|
|
target_link_libraries(testAeroMesh SimGearCore JSBSim)
|
|
|
|
add_test(testAeroMesh ${EXECUTABLE_OUTPUT_PATH}/testAeroMesh)
|