2021-01-13 20:07:28 +00: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 16:44:07 +00:00
o s m t e m p l a t e s e r v e r . c p p
2021-12-03 18:23:14 +00:00
i b p b e a c o n . c p p
2022-02-04 20:40:43 +00:00
w e b s e r v e r . c p p
2021-01-13 20:07:28 +00: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 16:44:07 +00:00
o s m t e m p l a t e s e r v e r . h
2021-01-22 14:54:22 +00:00
b e a c o n . h
2021-12-03 18:23:14 +00:00
i b p b e a c o n . h
2022-02-04 20:40:43 +00:00
w e b s e r v e r . 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 (
$ { 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 14:34:54 +00: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 20:07:28 +00: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
2023-01-02 15:47:24 +00:00
$ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / m a p g u i . u i
2021-01-22 14:54:22 +00: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 18:23:14 +00: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 15:15:50 +01: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 20:40:43 +00:00
m a p m o d e l . c p p
2023-02-14 14:46:08 +00:00
m a p i t e m . c p p
2022-02-04 20:40:43 +00: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 15:40:06 +00:00
m a p t i l e s e r v e r . c p p
2022-02-04 20:40:43 +00: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 20:07:28 +00:00
m a p . q r c
2021-02-26 20:30:59 +00:00
i c o n s . q r c
2022-02-04 20:40:43 +00:00
c e s i u m . q r c
2023-02-14 14:46:08 +00:00
d a t a . q r c
2021-01-13 20:07:28 +00:00
)
set ( map_HEADERS
$ { m a p _ H E A D E R S }
m a p g u i . h
2021-01-22 14:54:22 +00: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 18:23:14 +00:00
m a p i b p b e a c o n . h
2021-06-23 15:15:50 +01:00
m a p r a d i o t i m e d i a l o g . h
2022-02-04 20:40:43 +00:00
m a p m o d e l . h
2023-02-14 14:46:08 +00:00
m a p i t e m . h
2022-02-04 20:40:43 +00:00
m a p w e b s o c k e t s e r v e r . h
2024-02-27 15:40:06 +00:00
m a p t i l e s e r v e r . h
2022-02-04 20:40:43 +00: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 20:07:28 +00:00
)
set ( TARGET_NAME map )
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 )
set ( TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Svg Qt::Positioning Qt::Location Qt::WebEngine Qt::WebEngineCore Qt::WebEngineWidgets )
elseif ( Qt ${ QT_DEFAULT_MAJOR_VERSION } WebEngineCore_FOUND )
set ( TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Svg Qt::SvgWidgets Qt::Positioning Qt::Location Qt::WebEngineCore Qt::WebEngineWidgets )
2023-01-02 15:47:24 +00:00
else ( )
2024-02-27 15:40:06 +00:00
set ( TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Svg Qt::Positioning Qt::Location )
2023-01-02 15:47:24 +00:00
endif ( )
2021-01-13 20:07:28 +00:00
else ( )
set ( TARGET_NAME mapsrv )
set ( TARGET_LIB "" )
set ( TARGET_LIB_GUI "" )
set ( INSTALL_FOLDER ${ INSTALL_PLUGINSSRV_DIR } )
endif ( )
add_library ( ${ TARGET_NAME } SHARED
$ { m a p _ S O U R C E S }
)
target_link_libraries ( ${ TARGET_NAME }
2022-11-17 14:34:54 +00:00
Q t : : C o r e
2021-01-13 20:07:28 +00: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 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 ( )