C
Qt Cluster: Rendering and Recovery from Main UI Failure
# Generated from qtcluster.pro.
cmake_minimum_required(VERSION 3.16)
project(qtcluster LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS BuildInternals)
qt_add_executable(qtcluster WIN32 MACOSX_BUNDLE
circularindicator.cpp circularindicator.h
crasher.cpp crasher.h
etcprovider.cpp etcprovider.h
gauge.cpp gauge.h
gaugenode.cpp gaugenode.h
main.cpp
qtiviclusterdata.cpp qtiviclusterdata.h
clusterdatabackend.h clusterdatabackend.cpp
)
target_include_directories(qtcluster PUBLIC
.
)
#target_compile_definitions(qtcluster PUBLIC
# NO_NETWORK
#)
target_link_libraries(qtcluster PUBLIC
Qt::Core
Qt::Gui
Qt::Network
Qt::Quick
)
# Resources:
set(qtcluster_resource_files
"fonts/Lato-Bold.ttf"
"fonts/Lato-Regular.ttf"
"fonts/Lato-Semibold.ttf"
"qml/ConsumptionView.qml"
"qml/DashboardLoader.qml"
"qml/FpsCounter.qml"
"qml/MapView.qml"
"qml/MediaPlayerView.qml"
"qml/TurnIndicator.qml"
"qml/ValueSource.qml"
"qml/VehicleInfoNote.qml"
"qml/VideoView.qml"
"qml/functions.js"
"qml/route.txt"
)
qt6_add_resources(qtcluster "qtcluster"
PREFIX
"/"
FILES
${qtcluster_resource_files}
)
set(images_resource_files
"images/CarForParkSensors.png"
"images/Icon_TurnLeft_OFF.png"
"images/Icon_TurnLeft_ON.png"
"images/Icon_TurnRight_OFF.png"
"images/Icon_TurnRight_OFF_small.png"
"images/Icon_TurnRight_ON.png"
"images/Icon_TurnRight_ON_small.png"
"images/InfoNoteBackground.png"
"images/MapLocation.png"
"images/MusicPlayer_CircleRemaining.png"
"images/MusicPlayer_Cover.png"
"images/ParkingSensorOff.png"
"images/RearCameraOverlay.png"
"images/RearCameraStill.jpg"
)
qt6_add_resources(qtcluster "images"
PREFIX
"/"
FILES
${images_resource_files}
)
set(iso-icons_resource_files
"iso-icons/iso_grs_7000_4_0083.dat"
"iso-icons/iso_grs_7000_4_0238.dat"
"iso-icons/iso_grs_7000_4_0245.dat"
"iso-icons/iso_grs_7000_4_0246.dat"
"iso-icons/iso_grs_7000_4_0247.dat"
"iso-icons/iso_grs_7000_4_0249.dat"
"iso-icons/iso_grs_7000_4_0456.dat"
"iso-icons/iso_grs_7000_4_1434A.dat"
"iso-icons/iso_grs_7000_4_1555.dat"
"iso-icons/iso_grs_7000_4_1702.dat"
"iso-icons/iso_grs_7000_4_2426.dat"
)
qt6_add_resources(qtcluster "iso-icons"
PREFIX
"/"
FILES
${iso-icons_resource_files}
)
if(INTEGRITY)
find_package(Qt6 COMPONENTS SafeRenderer)
find_package(Qt6MessageSenderPlugin HINTS ${Qt6SafeRenderer_DIR})
qt_import_plugins(qtcluster INCLUDE Qt6::MessageSenderPlugin)
target_link_libraries(qtcluster PRIVATE Qt6::SafeRenderer Qt6::MessageSenderPlugin)
target_compile_definitions(qtcluster PUBLIC
STATIC
)
endif()
# Resources:
set(sportsqml_resource_files
"qml/CarParkingSports.qml"
"qml/dash_sports/CameraLoader.qml"
"qml/dash_sports/CenterStack.qml"
"qml/dash_sports/Dashboard.qml"
"qml/dash_sports/DashboardFrame.qml"
"qml/dash_sports/DashboardSportForm.ui.qml"
"qml/dash_sports/DashboardView.qml"
"qml/dash_sports/Gauge.qml"
"qml/dash_sports/RPMFlipable.qml"
"qml/dash_sports/RPMGauge.qml"
"qml/dash_sports/RPMGauge_painter.qml"
"qml/dash_sports/RPMGauge_vertex.qml"
"qml/dash_sports/SpeedoMeter.qml"
"qml/dash_sports/SpeedoMeterLoader.qml"
"qml/dash_sports/SpeedoMeter_painter.qml"
"qml/dash_sports/SpeedoMeter_vertex.qml"
"qml/dash_sports/TurnLeft.qml"
"qml/dash_sports/TurnRight.qml"
)
qt6_add_resources(qtcluster "sportsqml"
PREFIX
"/"
FILES
${sportsqml_resource_files}
)
set(sportsimages_resource_files
"images/DashboardFrameSport-mask.png"
"images/Gauge_RPM.png"
"images/Gauge_Speed.png"
"images/MapLocationSport.png"
"images/RearCameraOverlaySport.png"
"images/SportCarFloorShadow.png"
"images/SportCarForParkSensors.png"
)
qt6_add_resources(qtcluster "sportsimages"
PREFIX
"/"
FILES
${sportsimages_resource_files}
)
# Resources:
set(hybridqml_resource_files
"qml/dash_hybrid/BottomPanel.ui.qml"
"qml/dash_hybrid/CarInfoField.qml"
"qml/dash_hybrid/CenterView.qml"
"qml/dash_hybrid/CenterViewCalendar.qml"
"qml/dash_hybrid/CenterViewCarInfo.qml"
"qml/dash_hybrid/CenterViewContacts.qml"
"qml/dash_hybrid/CenterViewMusic.qml"
"qml/dash_hybrid/Dashboard.qml"
"qml/dash_hybrid/DashboardBackground.qml"
"qml/dash_hybrid/DashboardBackgroundForm.ui.qml"
"qml/dash_hybrid/DashboardForm.ui.qml"
"qml/dash_hybrid/DashboardFrame.qml"
"qml/dash_hybrid/DashboardView.qml"
"qml/dash_hybrid/Gadget.qml"
"qml/dash_hybrid/TurnLeft.qml"
"qml/dash_hybrid/TurnRight.qml"
"qml/dash_hybrid/gauges/ConsumptionMeter.qml"
"qml/dash_hybrid/gauges/FpsMeter.qml"
"qml/dash_hybrid/gauges/LargeMeter.qml"
"qml/dash_hybrid/gauges/SmallMeter.qml"
"qml/dash_hybrid/gauges/TemperatureMeter.qml"
"qml/dash_hybrid/gauges/TurboMeter.qml"
)
qt6_add_resources(qtcluster "hybridqml"
PREFIX
"/"
FILES
${hybridqml_resource_files}
)
set(hybridimages_resource_files
"images/BottomPanel.png"
"images/Built_with_Qt.png"
"images/CarInfoIcon.png"
"images/Cluster8Gauges.png"
"images/Icon_TurnLeft_OFF_small.png"
"images/Icon_TurnLeft_ON_small.png"
"images/calendar.png"
"images/center.png"
"images/contacts.png"
"images/cover.png"
"images/gaugeCenterBig.png"
"images/gaugeCenterSmall.png"
"images/gaugeNeedleBig.png"
"images/gaugeNeedleSmall.png"
"images/greenglow.png"
"images/heatNeedle.png"
"images/jane.png"
"images/john.png"
"images/knob.png"
"images/left.png"
"images/redglow.png"
"images/right.png"
"images/temperature.png"
)
qt6_add_resources(qtcluster "hybridimages"
PREFIX
"/"
FILES
${hybridimages_resource_files}
)
install(TARGETS qtcluster
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)