2021-01-13 15:07:28 -05:00
project ( map )
set ( map_SOURCES
m a p . c p p
m a p s e t t i n g s . c p p
m a p p l u g i n . c p p
m a p w e b a p i a d a p t e r . c p p
2021-11-23 11:44:07 -05:00
o s m t e m p l a t e s e r v e r . c p p
2021-12-03 13:23:14 -05:00
i b p b e a c o n . c p p
2022-02-04 15:40:43 -05:00
w e b s e r v e r . c p p
2021-01-13 15:07:28 -05:00
)
set ( map_HEADERS
m a p . h
m a p s e t t i n g s . h
m a p p l u g i n . h
m a p r e p o r t . h
m a p w e b a p i a d a p t e r . h
2021-11-23 11:44:07 -05:00
o s m t e m p l a t e s e r v e r . h
2021-01-22 09:54:22 -05:00
b e a c o n . h
2021-12-03 13:23:14 -05:00
i b p b e a c o n . h
2022-02-04 15:40:43 -05:00
w e b s e r v e r . h
2021-01-13 15:07:28 -05:00
)
2023-08-06 04:08:53 -04: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 10:47:24 -05:00
add_compile_definitions ( QT_WEBENGINE_FOUND )
configure_file ( mapguiwebengine.ui mapgui.ui )
else ( )
configure_file ( mapguinowebengine.ui mapgui.ui )
2023-08-06 04:08:53 -04: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 10:47:24 -05:00
endif ( )
set ( CMAKE_AUTOUIC_SEARCH_PATHS ${ CMAKE_CURRENT_BINARY_DIR } )
2021-01-13 15:07:28 -05:00
include_directories (
$ { C M A K E _ S O U R C E _ D I R } / s w a g g e r / s d r a n g e l / c o d e / q t 5 / c l i e n t
2022-11-17 09:34:54 -05:00
$ { Q t $ { Q T _ D E F A U L T _ M A J O R _ V E R S I O N } G u i _ P R I V A T E _ I N C L U D E _ D I R S }
2021-01-13 15:07:28 -05:00
)
if ( NOT SERVER_MODE )
set ( map_SOURCES
$ { m a p _ S O U R C E S }
m a p g u i . c p p
2024-09-17 04:47:45 -04:00
#${CMAKE_CURRENT_BINARY_DIR}/mapgui.ui
2021-01-22 09:54:22 -05:00
m a p l o c a t i o n d i a l o g . c p p
m a p l o c a t i o n d i a l o g . u i
m a p m a i d e n h e a d d i a l o g . c p p
m a p m a i d e n h e a d d i a l o g . u i
m a p s e t t i n g s d i a l o g . c p p
m a p s e t t i n g s d i a l o g . u i
m a p b e a c o n d i a l o g . c p p
m a p b e a c o n d i a l o g . u i
2021-12-03 13:23:14 -05:00
m a p i b p b e a c o n d i a l o g . c p p
m a p i b p b e a c o n d i a l o g . u i
2021-06-23 10:15:50 -04:00
m a p r a d i o t i m e d i a l o g . c p p
m a p r a d i o t i m e d i a l o g . u i
2022-02-04 15:40:43 -05:00
m a p m o d e l . c p p
2023-02-14 09:46:08 -05:00
m a p i t e m . c p p
2022-02-04 15:40:43 -05:00
m a p w e b s o c k e t s e r v e r . c p p
2024-02-27 10:40:06 -05:00
m a p t i l e s e r v e r . c p p
2022-02-04 15:40:43 -05:00
c e s i u m i n t e r f a c e . c p p
c z m l . c p p
2021-01-13 15:07:28 -05:00
m a p . q r c
2024-09-17 04:47:45 -04:00
m a p i c o n s . q r c
2022-02-04 15:40:43 -05:00
c e s i u m . q r c
2024-09-17 04:47:45 -04:00
m a p d a t a . q r c
2021-01-13 15:07:28 -05:00
)
set ( map_HEADERS
$ { m a p _ H E A D E R S }
m a p g u i . h
2021-01-22 09:54:22 -05:00
m a p l o c a t i o n d i a l o g . h
m a p m a i d e n h e a d d i a l o g . h
m a p s e t t i n g s d i a l o g . h
m a p b e a c o n d i a l o g . h
2021-12-03 13:23:14 -05:00
m a p i b p b e a c o n . h
2021-06-23 10:15:50 -04:00
m a p r a d i o t i m e d i a l o g . h
2022-02-04 15:40:43 -05:00
m a p m o d e l . h
2023-02-14 09:46:08 -05:00
m a p i t e m . h
2022-02-04 15:40:43 -05:00
m a p w e b s o c k e t s e r v e r . h
2024-02-27 10:40:06 -05:00
m a p t i l e s e r v e r . h
2022-02-04 15:40:43 -05:00
c e s i u m i n t e r f a c e . h
c z m l . h
2021-01-13 15:07:28 -05:00
)
2024-09-03 11:52:00 -04:00
set ( TARGET_NAME ${ PLUGINS_PREFIX } map )
2024-09-03 12:16:23 -04:00
set ( TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Svg Qt::Positioning Qt::Location )
2021-01-13 15:07:28 -05:00
set ( TARGET_LIB_GUI "sdrgui" )
set ( INSTALL_FOLDER ${ INSTALL_PLUGINS_DIR } )
2023-01-02 10:47:24 -05:00
2024-02-27 10:40:06 -05:00
if ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngine_FOUND )
2024-09-03 12:16:23 -04:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::WebEngine Qt::WebEngineCore Qt::WebEngineWidgets )
2024-02-27 10:40:06 -05:00
elseif ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngineCore_FOUND )
2024-09-03 12:16:23 -04:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::SvgWidgets Qt::WebEngineCore Qt::WebEngineWidgets )
2024-10-21 12:10:22 -04:00
elseif ( Qt6_FOUND )
# Not on Qt5 Android?
2024-09-03 12:16:23 -04:00
set ( TARGET_LIB ${ TARGET_LIB } Qt::SvgWidgets )
2023-01-02 10:47:24 -05:00
endif ( )
2021-01-13 15:07:28 -05:00
else ( )
2024-09-03 11:52:00 -04:00
set ( TARGET_NAME ${ PLUGINSSRV_PREFIX } mapsrv )
2021-01-13 15:07:28 -05:00
set ( TARGET_LIB "" )
set ( TARGET_LIB_GUI "" )
set ( INSTALL_FOLDER ${ INSTALL_PLUGINSSRV_DIR } )
endif ( )
2024-09-17 04:47:45 -04:00
if ( NOT Qt6_FOUND )
add_library ( ${ TARGET_NAME } ${ map_SOURCES } )
else ( )
qt_add_plugin ( ${ TARGET_NAME } CLASS_NAME MapPlugin ${ map_SOURCES } )
endif ( )
if ( NOT BUILD_SHARED_LIBS )
set_property ( GLOBAL APPEND PROPERTY STATIC_PLUGINS_PROPERTY ${ TARGET_NAME } )
endif ( )
2021-01-13 15:07:28 -05:00
2024-09-17 04:47:45 -04:00
target_link_libraries ( ${ TARGET_NAME } PRIVATE
2022-11-17 09:34:54 -05:00
Q t : : C o r e
2021-01-13 15:07:28 -05:00
$ { T A R G E T _ L I B }
s d r b a s e
$ { T A R G E T _ L I B _ G U I }
)
install ( TARGETS ${ TARGET_NAME } DESTINATION ${ INSTALL_FOLDER } )
2021-01-22 09:54:22 -05: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 15:40:43 -05:00
# Install debug symbols
if ( WIN32 )
install ( FILES $< TARGET_PDB_FILE:${TARGET_NAME} > CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${ INSTALL_FOLDER } )
endif ( )