2021-01-13 20:07:28 +00:00
project ( map )
set ( map_SOURCES
map.cpp
mapsettings.cpp
mapplugin.cpp
mapwebapiadapter.cpp
2021-11-23 16:44:07 +00:00
osmtemplateserver.cpp
2021-12-03 18:23:14 +00:00
ibpbeacon.cpp
2022-02-04 20:40:43 +00:00
webserver.cpp
2021-01-13 20:07:28 +00:00
)
set ( map_HEADERS
map.h
mapsettings.h
mapplugin.h
mapreport.h
mapwebapiadapter.h
2021-11-23 16:44:07 +00:00
osmtemplateserver.h
2021-01-22 14:54:22 +00:00
beacon.h
2021-12-03 18:23:14 +00:00
ibpbeacon.h
2022-02-04 20:40:43 +00:00
webserver.h
2021-01-13 20:07:28 +00:00
)
2023-08-06 09:08:53 +01:00
# WebEngine on Qt5, WebEngineCore on Qt6
if ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngine_FOUND OR Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngineCore_FOUND )
2023-01-02 15:47:24 +00:00
add_compile_definitions ( QT_WEBENGINE_FOUND )
configure_file ( mapguiwebengine.ui mapgui.ui )
else ( )
configure_file ( mapguinowebengine.ui mapgui.ui )
2023-08-06 09:08:53 +01:00
message ( STATUS "Not building 3D map (Qt${QT_DEFAULT_MAJOR_VERSION}WebEngine_FOUND=${Qt${QT_DEFAULT_MAJOR_VERSION}WebEngine_FOUND} Qt${QT_DEFAULT_MAJOR_VERSION}WebEngineCore_FOUND=${Qt${QT_DEFAULT_MAJOR_VERSION}WebEngineCore_FOUND})" )
2023-01-02 15:47:24 +00:00
endif ( )
set ( CMAKE_AUTOUIC_SEARCH_PATHS ${ CMAKE_CURRENT_BINARY_DIR } )
2021-01-13 20:07:28 +00:00
include_directories (
${ CMAKE_SOURCE_DIR } /swagger/sdrangel/code/qt5/client
2022-11-17 14:34:54 +00:00
${ Qt${QT_DEFAULT_MAJOR_VERSION } Gui_PRIVATE_INCLUDE_DIRS}
2021-01-13 20:07:28 +00:00
)
if ( NOT SERVER_MODE )
set ( map_SOURCES
${ map_SOURCES }
mapgui.cpp
2024-09-17 09:47:45 +01:00
#${CMAKE_CURRENT_BINARY_DIR}/mapgui.ui
2021-01-22 14:54:22 +00:00
maplocationdialog.cpp
maplocationdialog.ui
mapmaidenheaddialog.cpp
mapmaidenheaddialog.ui
mapsettingsdialog.cpp
mapsettingsdialog.ui
mapbeacondialog.cpp
mapbeacondialog.ui
2021-12-03 18:23:14 +00:00
mapibpbeacondialog.cpp
mapibpbeacondialog.ui
2021-06-23 15:15:50 +01:00
mapradiotimedialog.cpp
mapradiotimedialog.ui
2022-02-04 20:40:43 +00:00
mapmodel.cpp
2023-02-14 14:46:08 +00:00
mapitem.cpp
2022-02-04 20:40:43 +00:00
mapwebsocketserver.cpp
2024-02-27 15:40:06 +00:00
maptileserver.cpp
2022-02-04 20:40:43 +00:00
cesiuminterface.cpp
czml.cpp
2021-01-13 20:07:28 +00:00
map.qrc
2024-09-17 09:47:45 +01:00
mapicons.qrc
2022-02-04 20:40:43 +00:00
cesium.qrc
2024-09-17 09:47:45 +01:00
mapdata.qrc
2021-01-13 20:07:28 +00:00
)
set ( map_HEADERS
${ map_HEADERS }
mapgui.h
2021-01-22 14:54:22 +00:00
maplocationdialog.h
mapmaidenheaddialog.h
mapsettingsdialog.h
mapbeacondialog.h
2021-12-03 18:23:14 +00:00
mapibpbeacon.h
2021-06-23 15:15:50 +01:00
mapradiotimedialog.h
2022-02-04 20:40:43 +00:00
mapmodel.h
2023-02-14 14:46:08 +00:00
mapitem.h
2022-02-04 20:40:43 +00:00
mapwebsocketserver.h
2024-02-27 15:40:06 +00:00
maptileserver.h
2022-02-04 20:40:43 +00:00
cesiuminterface.h
czml.h
2021-01-13 20:07:28 +00:00
)
2024-09-03 18:52:00 +03:00
set ( TARGET_NAME ${ PLUGINS_PREFIX } map )
2024-09-03 19:16:23 +03:00
set ( TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Svg Qt::Positioning Qt::Location )
2021-01-13 20:07:28 +00:00
set ( TARGET_LIB_GUI "sdrgui" )
set ( INSTALL_FOLDER ${ INSTALL_PLUGINS_DIR } )
2023-01-02 15:47:24 +00:00
2024-02-27 15:40:06 +00:00
if ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngine_FOUND )
2024-09-03 19:16:23 +03:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::WebEngine Qt::WebEngineCore Qt::WebEngineWidgets )
2024-02-27 15:40:06 +00:00
elseif ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngineCore_FOUND )
2024-09-03 19:16:23 +03:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::SvgWidgets Qt::WebEngineCore Qt::WebEngineWidgets )
2024-10-21 17:10:22 +01:00
elseif ( Qt6_FOUND )
# Not on Qt5 Android?
2024-09-03 19:16:23 +03:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::SvgWidgets )
2023-01-02 15:47:24 +00:00
endif ( )
2021-01-13 20:07:28 +00:00
else ( )
2024-09-03 18:52:00 +03:00
set ( TARGET_NAME ${ PLUGINSSRV_PREFIX } mapsrv )
2021-01-13 20:07:28 +00:00
set ( TARGET_LIB "" )
set ( TARGET_LIB_GUI "" )
set ( INSTALL_FOLDER ${ INSTALL_PLUGINSSRV_DIR } )
endif ( )
2024-09-17 09:47:45 +01:00
if ( NOT Qt6_FOUND )
add_library ( ${ TARGET_NAME } ${ map_SOURCES } )
else ( )
2026-04-25 17:11:41 +02:00
qt_add_plugin ( ${ TARGET_NAME } CLASS_NAME MapPlugin )
target_sources ( ${ TARGET_NAME } PRIVATE ${ map_SOURCES } )
2024-09-17 09:47:45 +01:00
endif ( )
if ( NOT BUILD_SHARED_LIBS )
set_property ( GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${ TARGET_NAME } )
endif ( )
2021-01-13 20:07:28 +00:00
2024-09-17 09:47:45 +01:00
target_link_libraries ( ${ TARGET_NAME } PRIVATE
2022-11-17 14:34:54 +00:00
Qt::Core
2021-01-13 20:07:28 +00:00
${ TARGET_LIB }
sdrbase
${ TARGET_LIB_GUI }
)
install ( TARGETS ${ TARGET_NAME } DESTINATION ${ INSTALL_FOLDER } )
2021-01-22 14:54:22 +00:00
if ( WIN32 )
# Run deployqt for QtQuick etc
include ( DeployQt )
windeployqt ( ${ TARGET_NAME } ${ SDRANGEL_BINARY_BIN_DIR } ${ PROJECT_SOURCE_DIR } /map )
endif ( )
2022-02-04 20:40:43 +00:00
# Install debug symbols
if ( WIN32 )
install ( FILES $< TARGET_PDB_FILE:${TARGET_NAME} > CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${ INSTALL_FOLDER } )
endif ( )