125 líneas
3.7 KiB
CMake
125 líneas
3.7 KiB
CMake
# Author:
|
|
# Sven Czarnian <devel@svcz.de>
|
|
# Copyright:
|
|
# 2021 Sven Czarnian
|
|
# License:
|
|
# GNU General Public License (GPLv3)
|
|
# Brief:
|
|
# Creates the plug-in which is used by Euroscope
|
|
|
|
ADD_DEFINITIONS(-DCURL_STATICLIB)
|
|
|
|
# define the Google Protobuf-files
|
|
SET(PROTO_FILES
|
|
${CMAKE_CURRENT_SOURCE_DIR}/com/protobuf/Aircraft.proto
|
|
${CMAKE_CURRENT_SOURCE_DIR}/com/protobuf/AircraftReport.proto
|
|
${CMAKE_CURRENT_SOURCE_DIR}/com/protobuf/AircraftSchedule.proto
|
|
${CMAKE_CURRENT_SOURCE_DIR}/com/protobuf/BaseTypes.proto
|
|
${CMAKE_CURRENT_SOURCE_DIR}/com/protobuf/Communication.proto
|
|
)
|
|
|
|
# generate the Protobuf C++ files
|
|
SET(PROTO_SOURCE_FILES "")
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
|
|
ProtobufCompile("${PROTO_FILES}" PROTO_SOURCE_FILES)
|
|
|
|
SET(SOURCE_FILES
|
|
ArrivalMANagerMain.cpp
|
|
PlugIn.cpp
|
|
PlugIn.h
|
|
RadarScreen.cpp
|
|
RadarScreen.h
|
|
stdafx.cpp
|
|
stdafx.h
|
|
)
|
|
|
|
SET(SOURCE_COM_FILES
|
|
com/Backend.cpp
|
|
com/ZmqContext.cpp
|
|
com/ZmqContext.h
|
|
)
|
|
|
|
SET(SOURCE_CONFIG_FILES
|
|
config/CommunicationFileFormat.cpp
|
|
config/FileFormat.cpp
|
|
config/IdentifierFileFormat.cpp
|
|
)
|
|
|
|
SET(SOURCE_TYPES_FILES
|
|
types/GeoCoordinate.cpp
|
|
)
|
|
|
|
SET(SOURCE_FILES_RES
|
|
${CMAKE_BINARY_DIR}/ArrivalMANager.rc
|
|
${CMAKE_SOURCE_DIR}/res/resource.h
|
|
${CMAKE_SOURCE_DIR}/res/targetver.h
|
|
)
|
|
|
|
SET(INCLUDE_COM_FILES
|
|
${CMAKE_SOURCE_DIR}/include/aman/com/Backend.h
|
|
)
|
|
|
|
SET(INCLUDE_CONFIG_FILES
|
|
${CMAKE_SOURCE_DIR}/include/aman/config/CommunicationFileFormat.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/config/FileFormat.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/config/IdentifierFileFormat.h
|
|
)
|
|
|
|
SET(INCLUDE_HELPER_FILES
|
|
${CMAKE_SOURCE_DIR}/include/aman/helper/Math.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/helper/String.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/helper/UtcTime.h
|
|
)
|
|
|
|
SET(INCLUDE_TYPES_FILES
|
|
${CMAKE_SOURCE_DIR}/include/aman/types/Communication.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/types/GeoCoordinate.h
|
|
${CMAKE_SOURCE_DIR}/include/aman/types/Quantity.hpp
|
|
)
|
|
|
|
# define the plug in
|
|
ADD_LIBRARY(
|
|
ArrivalMANager SHARED
|
|
${SOURCE_FILES_RES}
|
|
${SOURCE_COM_FILES}
|
|
${SOURCE_CONFIG_FILES}
|
|
${SOURCE_TYPES_FILES}
|
|
${SOURCE_FILES}
|
|
${PROTO_SOURCE_FILES}
|
|
${PROTO_FILES}
|
|
${INCLUDE_COM_FILES}
|
|
${INCLUDE_CONFIG_FILES}
|
|
${INCLUDE_HELPER_FILES}
|
|
${INCLUDE_TYPES_FILES}
|
|
)
|
|
|
|
# define the dependencies
|
|
TARGET_INCLUDE_DIRECTORIES(ArrivalMANager INTERFACE EuroScope)
|
|
TARGET_LINK_LIBRARIES(ArrivalMANager EuroScope libcurl GSL Shlwapi)
|
|
TARGET_LINK_LIBRARIES(ArrivalMANager cppzmq protobuf jsoncpp GeographicLib)
|
|
|
|
# configure the debugger and update the linker flags
|
|
IF(MSVC)
|
|
SET_TARGET_PROPERTIES(ArrivalMANager
|
|
PROPERTIES
|
|
VS_DEBUGGER_COMMAND ${EuroScope_EXECUTABLE}
|
|
VS_DEBUGGER_WORKING_DIRECTORY ${EuroScope_DIR}
|
|
)
|
|
SET_TARGET_PROPERTIES(ArrivalMANager
|
|
PROPERTIES
|
|
LINK_FLAGS /SUBSYSTEM:WINDOWS
|
|
)
|
|
ENDIF()
|
|
|
|
SOURCE_GROUP("Generated Files" FILES ${PROTO_SOURCE_FILES})
|
|
SOURCE_GROUP("Protocol Files" FILES ${PROTO_FILES})
|
|
SOURCE_GROUP("Source Files" FILES ${SOURCE_FILES})
|
|
SOURCE_GROUP("Source Files\\com" FILES ${SOURCE_COM_FILES})
|
|
SOURCE_GROUP("Source Files\\config" FILES ${SOURCE_CONFIG_FILES})
|
|
SOURCE_GROUP("Source Files\\types" FILES ${SOURCE_TYPES_FILES})
|
|
SOURCE_GROUP("Source Files\\res" FILES ${SOURCE_FILES_RES})
|
|
SOURCE_GROUP("Header Files\\com" FILES ${INCLUDE_COM_FILES})
|
|
SOURCE_GROUP("Header Files\\config" FILES ${INCLUDE_CONFIG_FILES})
|
|
SOURCE_GROUP("Header Files\\helper" FILES ${INCLUDE_HELPER_FILES})
|
|
SOURCE_GROUP("Header Files\\types" FILES ${INCLUDE_TYPES_FILES})
|