1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00
sdrangel/plugins/feature/map/CMakeLists.txt

134 lines
3.6 KiB
CMake
Raw Normal View History

project(map)
set(map_SOURCES
map.cpp
mapsettings.cpp
mapplugin.cpp
mapwebapiadapter.cpp
2021-11-23 11:44:07 -05:00
osmtemplateserver.cpp
ibpbeacon.cpp
2022-02-04 15:40:43 -05:00
webserver.cpp
)
set(map_HEADERS
map.h
mapsettings.h
mapplugin.h
mapreport.h
mapwebapiadapter.h
2021-11-23 11:44:07 -05:00
osmtemplateserver.h
beacon.h
ibpbeacon.h
2022-02-04 15:40:43 -05:00
webserver.h
)
# WebEngine on Qt5, WebEngineCore on Qt6
if(Qt${QT_DEFAULT_MAJOR_VERSION}WebEngine_FOUND OR Qt${QT_DEFAULT_MAJOR_VERSION}WebEngineCore_FOUND)
add_compile_definitions(QT_WEBENGINE_FOUND)
configure_file(mapguiwebengine.ui mapgui.ui)
else()
configure_file(mapguinowebengine.ui mapgui.ui)
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})")
endif()
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_BINARY_DIR})
include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
${Qt${QT_DEFAULT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}
)
if(NOT SERVER_MODE)
set(map_SOURCES
${map_SOURCES}
mapgui.cpp
#${CMAKE_CURRENT_BINARY_DIR}/mapgui.ui
maplocationdialog.cpp
maplocationdialog.ui
mapmaidenheaddialog.cpp
mapmaidenheaddialog.ui
mapsettingsdialog.cpp
mapsettingsdialog.ui
mapbeacondialog.cpp
mapbeacondialog.ui
mapibpbeacondialog.cpp
mapibpbeacondialog.ui
2021-06-23 10:15:50 -04:00
mapradiotimedialog.cpp
mapradiotimedialog.ui
2022-02-04 15:40:43 -05:00
mapmodel.cpp
mapitem.cpp
2022-02-04 15:40:43 -05:00
mapwebsocketserver.cpp
maptileserver.cpp
2022-02-04 15:40:43 -05:00
cesiuminterface.cpp
czml.cpp
map.qrc
mapicons.qrc
2022-02-04 15:40:43 -05:00
cesium.qrc
mapdata.qrc
)
set(map_HEADERS
${map_HEADERS}
mapgui.h
maplocationdialog.h
mapmaidenheaddialog.h
mapsettingsdialog.h
mapbeacondialog.h
mapibpbeacon.h
2021-06-23 10:15:50 -04:00
mapradiotimedialog.h
2022-02-04 15:40:43 -05:00
mapmodel.h
mapitem.h
2022-02-04 15:40:43 -05:00
mapwebsocketserver.h
maptileserver.h
2022-02-04 15:40:43 -05:00
cesiuminterface.h
czml.h
)
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)
set(TARGET_LIB_GUI "sdrgui")
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
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)
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)
endif()
else()
set(TARGET_NAME ${PLUGINSSRV_PREFIX}mapsrv)
set(TARGET_LIB "")
set(TARGET_LIB_GUI "")
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
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()
target_link_libraries(${TARGET_NAME} PRIVATE
Qt::Core
${TARGET_LIB}
sdrbase
${TARGET_LIB_GUI}
)
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
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()