468 lines
12 KiB
CMake
Executable File
468 lines
12 KiB
CMake
Executable File
#es
|
|
# $Id$
|
|
# $HeadURL$
|
|
# $Author$
|
|
#
|
|
|
|
INCLUDE(MacroRTIDDSGen)
|
|
INCLUDE(MacroCodeGenIdl)
|
|
|
|
SET(xml_FILE aes_service.xml)
|
|
|
|
#
|
|
# --- Library svcAesCommon --------------------------------------------------------------------------------
|
|
#
|
|
SET(SRCS_common
|
|
aes_export.h
|
|
logger.cpp
|
|
logger.h
|
|
Utils/icons.cpp
|
|
Utils/icons.h
|
|
Utils/intersections.cpp
|
|
Utils/intersections.h
|
|
Utils/tne_algorithmen.h
|
|
Utils/tne_algorithmen.cpp
|
|
Utils/polygons.h
|
|
Utils/polygons.cpp
|
|
Utils/polygons.h
|
|
Utils/ddsdbconvert.cpp
|
|
Utils/ddsdbconvert.h
|
|
Utils/aes_helper.cpp
|
|
Utils/aes_helper.h
|
|
Utils/fire_automaton.cpp
|
|
Utils/fire_automaton.h
|
|
Utils/firing_timer.cpp
|
|
Utils/firing_timer.h
|
|
settings.cpp
|
|
settings.h
|
|
)
|
|
|
|
# copy aes_predefined_data.sql to share
|
|
SET(in_file_sql "aes_predefined_data.sql")
|
|
SET(out_dir_sql "${CMAKE_BINARY_DIR}/share/Lts/sql/")
|
|
SET(out_file_sql "${out_dir_sql}/${in_file_sql}")
|
|
ADD_CUSTOM_COMMAND(OUTPUT ${out_file_sql}
|
|
COMMAND ${CMAKE_COMMAND}
|
|
ARGS -E make_directory ${out_dir_sql}
|
|
COMMAND ${CMAKE_COMMAND}
|
|
ARGS -E copy_if_different ${in_file_sql} ${out_file_sql}
|
|
DEPENDS ${in_file_sql}
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
LIST(APPEND SRCS_common ${in_file_sql} ${out_file_sql})
|
|
|
|
# Generate aes_enums.idl / aes.idl / aes_enums.cpp/aes_enums.h
|
|
CODEGEN_IDL_SVC(SRCS_common ${xml_FILE})
|
|
# Generate aes_db_structs.cpp/.h
|
|
CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE})
|
|
# Generate aes_db_impl.cpp/.h,
|
|
CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE})
|
|
# Generate aes_dao.cpp/.h
|
|
CODEGEN_DAO(SRCS_common ${xml_FILE})
|
|
|
|
# Generate *.cpp/*.hpp from aes_enums.idl / aes.idl
|
|
RTIDDSGEN(SRCS_common aes_enums.idl)
|
|
RTIDDSGEN(SRCS_common aes.idl)
|
|
|
|
# Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h
|
|
CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
|
# generate aes_[d|f]tc.h
|
|
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
|
|
|
NGL_ADD_LIBRARY(AAR SV WS HLA svcAesCommon SHARED ${SRCS_common} )
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesCommon
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
|
)
|
|
NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
|
PRIVATE
|
|
RTI::nddscpp2
|
|
LtsCoordTrans
|
|
PUBLIC
|
|
Qt5::Core
|
|
Qt5::Gui
|
|
Qt5::Xml
|
|
ddscore
|
|
svcPdmCommon
|
|
svcPpmCommon
|
|
NGLLogger
|
|
nglsettings
|
|
ngltools
|
|
situationMapElevationMap
|
|
Trajectory
|
|
ngldb
|
|
)
|
|
NGL_INSTALL_TARGET(svcAesCommon)
|
|
|
|
#
|
|
# --- Library svcAesClient --------------------------------------------------------------------------------
|
|
#
|
|
SET(SRCS_client
|
|
aes_dtc_impl_custom.cpp
|
|
aes_dtc_impl_custom.h
|
|
aes_export.h
|
|
)
|
|
# generate aes_[d|f]tc_impl.[cpp|h]
|
|
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
|
# SV wegen ft unit test
|
|
NGL_ADD_LIBRARY(AAR SV HLA WS svcAesClient SHARED ${SRCS_client})
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesClient
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
|
)
|
|
|
|
NGL_TARGET_LINK_LIBRARIES(svcAesClient
|
|
PRIVATE
|
|
RTI::nddscpp2
|
|
ddsconnector
|
|
PUBLIC
|
|
svcAesCommon
|
|
nglsettings
|
|
ngltools
|
|
ddsftc
|
|
)
|
|
NGL_INSTALL_TARGET(svcAesClient)
|
|
|
|
#
|
|
# --- Library svcAesServer --------------------------------------------------------------------------------
|
|
#
|
|
SET(SRCS_server
|
|
aes_export.h
|
|
log4cxx_aes.props
|
|
)
|
|
# generate aes_[d|f]ts.h, aes_[d|f]ts_impl.[cpp|h]
|
|
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
|
|
|
|
|
#WS for Record Replay plugin stand alone build
|
|
|
|
NGL_ADD_LIBRARY(AAR SV WS svcAesServer SHARED ${SRCS_server})
|
|
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesServer
|
|
PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
|
)
|
|
|
|
NGL_TARGET_LINK_LIBRARIES(svcAesServer
|
|
PRIVATE
|
|
RTI::nddscpp2
|
|
ddsconnector
|
|
ddsfts
|
|
PUBLIC
|
|
svcAesCommon
|
|
ngldb
|
|
)
|
|
NGL_INSTALL_TARGET(svcAesServer)
|
|
|
|
#
|
|
# --- Topic Type Plugin --------------------------------------------------------------
|
|
#
|
|
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
|
|
|
|
#
|
|
# --- RecordReplayPlugin --------------------------------------------------------------
|
|
#
|
|
CREATE_RECORD_REPLAY_PLUGIN_SHARED(${xml_FILE})
|
|
|
|
#
|
|
# --- RecordReplayPlugin --------------------------------------------------------------
|
|
#
|
|
IF (TARGET aesRecordReplayPlugin)
|
|
TARGET_SOURCES(aesRecordReplayPlugin
|
|
PRIVATE
|
|
RecordReplay/aes_record_replay_plugin_custom.cpp
|
|
RecordReplay/aes_record_replay_plugin_custom.h
|
|
)
|
|
TARGET_LINK_LIBRARIES(aesRecordReplayPlugin
|
|
Qt5::Concurrent
|
|
svcAesServer
|
|
svcAesClient
|
|
)
|
|
ENDIF()
|
|
|
|
|
|
|
|
#
|
|
# --- Executable svcAreaEffectSimulation (sAES) --------------------------------------------------------------
|
|
#
|
|
|
|
LIST(APPEND SRCS_exe
|
|
dds_handler.cpp
|
|
dds_handler.h
|
|
handler_air_support_impact.cpp
|
|
handler_air_support_impact.h
|
|
handler_base.cpp
|
|
handler_base.h
|
|
handler_bccontamination.cpp
|
|
handler_bccontamination.h
|
|
handler_booby_trap.cpp
|
|
handler_booby_trap.h
|
|
handler_borderline.cpp
|
|
handler_borderline.h
|
|
handler_charge_administration.cpp
|
|
handler_charge_administration.h
|
|
handler_charge_effect.cpp
|
|
handler_charge_effect.h
|
|
handler_danger_area.cpp
|
|
handler_danger_area.h
|
|
handler_dus_single_mine.cpp
|
|
handler_dus_single_mine.h
|
|
handler_effect_cluster.h
|
|
handler_effect_cluster.cpp
|
|
handler_explosion_area.cpp
|
|
handler_explosion_area.h
|
|
handler_explosion_cluster.cpp
|
|
handler_explosion_cluster.h
|
|
handler_explosion_single.cpp
|
|
handler_explosion_single.h
|
|
handler_functional_area.cpp
|
|
handler_functional_area.h
|
|
handler_gas_pipe.cpp
|
|
handler_gas_pipe.h
|
|
handler_mine_area.cpp
|
|
handler_mine_area.h
|
|
handler_mine_corridor.cpp
|
|
handler_mine_corridor.h
|
|
handler_ncontamination.cpp
|
|
handler_ncontamination.h
|
|
handler_off_route_mine.cpp
|
|
handler_off_route_mine.h
|
|
handler_recon_area.cpp
|
|
handler_recon_area.h
|
|
handler_technical_area.cpp
|
|
handler_technical_area.h
|
|
handler_effector.cpp
|
|
handler_effector.h
|
|
handler_trajectory.cpp
|
|
handler_trajectory.h
|
|
main.cpp
|
|
main_handler.cpp
|
|
main_handler.h
|
|
meteo_data_provider.cpp
|
|
meteo_data_provider.h
|
|
mine_corridor_creator.cpp
|
|
mine_corridor_creator.h
|
|
object_air_support_impact.cpp
|
|
object_air_support_impact.h
|
|
object_base.cpp
|
|
object_base.h
|
|
object_bccontamination.cpp
|
|
object_bccontamination.h
|
|
object_booby_trap.cpp
|
|
object_booby_trap.h
|
|
object_borderline.cpp
|
|
object_borderline.h
|
|
object_charge_administration.cpp
|
|
object_charge_administration.h
|
|
object_charge_effect.cpp
|
|
object_charge_effect.h
|
|
object_danger_area.cpp
|
|
object_danger_area.h
|
|
object_dus_single_mine.cpp
|
|
object_dus_single_mine.h
|
|
object_effect_cluster.h
|
|
object_effect_cluster.cpp
|
|
object_explosion_area.cpp
|
|
object_explosion_area.h
|
|
object_explosion_cluster.cpp
|
|
object_explosion_cluster.h
|
|
object_explosion_single.cpp
|
|
object_explosion_single.h
|
|
object_functional_area.cpp
|
|
object_functional_area.h
|
|
object_gas_pipe.cpp
|
|
object_gas_pipe.h
|
|
object_mine_area.cpp
|
|
object_mine_area.h
|
|
object_mine_area_null.cpp
|
|
object_mine_area_null.h
|
|
object_mine_corridor.cpp
|
|
object_mine_corridor.h
|
|
object_ncontamination.cpp
|
|
object_ncontamination.h
|
|
object_off_route_mine.cpp
|
|
object_off_route_mine.h
|
|
object_recon_area.cpp
|
|
object_recon_area.h
|
|
object_technical_area.cpp
|
|
object_technical_area.h
|
|
object_effector.cpp
|
|
object_effector.h
|
|
object_trajectory.cpp
|
|
object_trajectory.h
|
|
special_area_provider.cpp
|
|
special_area_provider.h
|
|
effector_state_machine.cpp
|
|
effector_state_machine.h
|
|
./EffectorFiringStrategy/abstract_firing_strategy.cpp
|
|
./EffectorFiringStrategy/abstract_firing_strategy.h
|
|
./EffectorFiringStrategy/default_firing_strategy.cpp
|
|
./EffectorFiringStrategy/default_firing_strategy.h
|
|
./EffectorFiringStrategy/dm72_firing_strategy.cpp
|
|
./EffectorFiringStrategy/dm72_firing_strategy.h
|
|
./EffectorFiringStrategy/firing_strategy_factory.cpp
|
|
./EffectorFiringStrategy/firing_strategy_factory.h
|
|
./EffectorFiringStrategy/gmlrs_firing_strategy.cpp
|
|
./EffectorFiringStrategy/gmlrs_firing_strategy.h
|
|
./EffectorFiringStrategy/smart_firing_strategy.h
|
|
./EffectorFiringStrategy/smart_firing_strategy.cpp
|
|
./TrajectorySplitter/trajectory_splitter.cpp
|
|
./TrajectorySplitter/trajectory_splitter.h
|
|
)
|
|
|
|
# Generate aes.sql, aes.xml
|
|
CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
|
|
|
NGL_ADD_SVC_ICON(SRCS_exe)
|
|
NGL_ADD_EXECUTABLE(AAR SV svcAreaEffectSimulation ${SRCS_exe})
|
|
NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
|
svcAesServer
|
|
svcCesClient
|
|
svcCoreClient
|
|
svcMdmClient
|
|
svcPdmClient
|
|
svcPpmClient
|
|
svcTabClient
|
|
svcIsmClient
|
|
svcExmClient
|
|
svcAsmClient
|
|
Qt5::Core
|
|
Qt5::Gui # QVector3D
|
|
RTI::nddscpp2
|
|
nglsettings
|
|
ProjectConfig
|
|
LtsCommandLineParser
|
|
LtsCoordTrans
|
|
LtsUtilsCore
|
|
LtsUtilsDds
|
|
LtsElevation
|
|
NGLLogger
|
|
nglcoreapplication
|
|
ddsconnector
|
|
ngltools
|
|
saaTelegrams
|
|
)
|
|
NGL_INSTALL_TARGET(svcAreaEffectSimulation)
|
|
NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin)
|
|
NGL_ADD_TARGET_LINK(svcAreaEffectSimulation sAES)
|
|
|
|
#
|
|
# --- Tests --------------------------------------------------------------
|
|
#
|
|
MACRO(ADD_FT_TEST type)
|
|
IF(TARGET svcAesClient)
|
|
IF(NOT TARGET aes_test_base)
|
|
NGL_ADD_LIBRARY2(AAR SV NO_TRANSLATION aes_test_base SHARED
|
|
ModuleTests/aes_test_base.cpp
|
|
ModuleTests/aes_test_base.h
|
|
)
|
|
NGL_TARGET_LINK_LIBRARIES(aes_test_base
|
|
Qt5::Core
|
|
Qt5::Test
|
|
ddsconnector
|
|
LtsCommandLineParser
|
|
nglcoreapplication
|
|
svcAesClient
|
|
LtsCoordTrans
|
|
)
|
|
ENDIF()
|
|
SET(_tgt_name aes_test_${type})
|
|
NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION ${_tgt_name}
|
|
ModuleTests/aes_test_${type}.cpp
|
|
ModuleTests/aes_test_${type}.h
|
|
)
|
|
NGL_TARGET_LINK_LIBRARIES(${_tgt_name}
|
|
aes_test_base
|
|
)
|
|
NGL_INSTALL_TARGET(${_tgt_name} DESTINATION bin/test)
|
|
ENDIF()
|
|
ENDMACRO()
|
|
ADD_FT_TEST(air_support_impact)
|
|
ADD_FT_TEST(bccontamination)
|
|
ADD_FT_TEST(booby_trap)
|
|
ADD_FT_TEST(charge_administration)
|
|
ADD_FT_TEST(danger_area)
|
|
ADD_FT_TEST(explosion_area)
|
|
ADD_FT_TEST(explosion_area_bulk)
|
|
ADD_FT_TEST(explosion_single)
|
|
ADD_FT_TEST(explosion_cluster)
|
|
ADD_FT_TEST(gas_pipe)
|
|
ADD_FT_TEST(mine_area)
|
|
ADD_FT_TEST(ncontamination)
|
|
ADD_FT_TEST(off_route_mine)
|
|
NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin/test)
|
|
|
|
#
|
|
# --- Tests --------------------------------------------------------------
|
|
#
|
|
NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_utils_test
|
|
Utils/test_main.cpp
|
|
)
|
|
|
|
NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
|
Qt5::Core
|
|
Qt5::Widgets
|
|
RTI::nddscpp2
|
|
svcAesCommon
|
|
ProjectConfig
|
|
ddsconnector
|
|
nglapplication
|
|
LtsCoordTrans
|
|
)
|
|
NGL_INSTALL(AAR SV TARGETS aes_utils_test DESTINATION bin/test)
|
|
|
|
#
|
|
# --- Tests --------------------------------------------------------------
|
|
#
|
|
NGL_ADD_EXECUTABLE(SV NO_TRANSLATION aes_convert_mine_area
|
|
ModuleTests/aes_convert_mine_area.cpp
|
|
)
|
|
|
|
NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
|
Qt5::Core
|
|
# Qt5::Widgets
|
|
# RTI::nddscpp2
|
|
svcAesServer
|
|
ProjectConfig
|
|
# nglapplication
|
|
LtsCoordTrans
|
|
ngldb
|
|
LtsCommandLineParser
|
|
nglcoreapplication
|
|
nglsettings
|
|
ngltools
|
|
)
|
|
NGL_INSTALL(SV TARGETS aes_convert_mine_area DESTINATION bin/test)
|
|
|
|
|
|
#
|
|
# --- SUBDIRECTORY --------------------------------------------------------------
|
|
#
|
|
ADD_SUBDIRECTORY(Trajectory)
|
|
|
|
# Used to pack this specific Module Test in rpm. Please not use this for other tests
|
|
ADD_SUBDIRECTORY(ModuleTest_Limits)
|
|
|
|
|
|
#
|
|
# --- Tests --------------------------------------------------------------
|
|
#
|
|
IF(BUILD_TESTING)
|
|
ADD_SUBDIRECTORY(UnitTests)
|
|
ADD_SUBDIRECTORY(UnitTest_FireAutomaton)
|
|
ADD_SUBDIRECTORY(TrajectorySplitter)
|
|
ADD_SUBDIRECTORY(ModuleTest_EffectCluster)
|
|
ADD_SUBDIRECTORY(ModuleTest_ExplosionCluster)
|
|
ADD_SUBDIRECTORY(ModuleTest_others)
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin)
|
|
|
|
NGL_INSTALL(AAR SV FILES aes_predefined_data.sql DESTINATION share/Lts/sql)
|