diff options
Diffstat (limited to 'examples/ivicore/qface-tutorial/chapter3-simulation-backend')
5 files changed, 276 insertions, 0 deletions
diff --git a/examples/ivicore/qface-tutorial/chapter3-simulation-backend/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/CMakeLists.txt new file mode 100644 index 0000000..7be44e4 --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/CMakeLists.txt @@ -0,0 +1,6 @@ +# Generated from chapter3-simulation-backend.pro. + +add_subdirectory(instrument-cluster) +add_subdirectory(frontend) +add_subdirectory(backend_simulator) +add_subdirectory(imports) diff --git a/examples/ivicore/qface-tutorial/chapter3-simulation-backend/backend_simulator/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/backend_simulator/CMakeLists.txt new file mode 100644 index 0000000..9927170 --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/backend_simulator/CMakeLists.txt @@ -0,0 +1,42 @@ +# Generated from backend_simulator.pro. + +cmake_minimum_required(VERSION 3.14) +project(instrumentcluster_simulation 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}/ivicore/qface-tutorial/chapter3-simulation-backend") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS IviCore) + +) +set_target_properties(instrumentcluster_simulation PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) +target_include_directories(instrumentcluster_simulation PUBLIC + ${CMAKE_CURRENT_BINARY_DIR}/../frontend +) + +target_link_libraries(instrumentcluster_simulation PUBLIC + # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../ + Qt::Core + Qt::Gui + Qt::IviCore +) + +install(TARGETS instrumentcluster_simulation + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/ivicore/qface-tutorial/chapter3-simulation-backend/frontend/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/frontend/CMakeLists.txt new file mode 100644 index 0000000..dc2a4c6 --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/frontend/CMakeLists.txt @@ -0,0 +1,46 @@ +# Generated from frontend.pro. + +cmake_minimum_required(VERSION 3.14) +project(QtIviInstrumentCluster 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}/ivicore/qface-tutorial/chapter3-simulation-backend") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS IviCore) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +) +set_target_properties(QtIviInstrumentCluster PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) +target_compile_definitions(QtIviInstrumentCluster PUBLIC + QT_BUILD_EXAMPLE_IVI_INSTRUMENTCLUSTER_LIB +) + +target_link_libraries(QtIviInstrumentCluster PUBLIC + Qt::Core + Qt::Gui + Qt::IviCore + Qt::IviCorePrivate + Qt::Qml + Qt::Quick +) + +install(TARGETS QtIviInstrumentCluster + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/ivicore/qface-tutorial/chapter3-simulation-backend/imports/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/imports/CMakeLists.txt new file mode 100644 index 0000000..931e18d --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/imports/CMakeLists.txt @@ -0,0 +1,42 @@ +# Generated from imports.pro. + +cmake_minimum_required(VERSION 3.14) +project(imports 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}/ivicore/qface-tutorial/chapter3-simulation-backend/imports") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS IviCore) + +) +set_target_properties(imports PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE TRUE +) +target_include_directories(imports PUBLIC + ${CMAKE_CURRENT_BINARY_DIR}/../frontend +) + +target_link_libraries(imports PUBLIC + # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../ + Qt::Core + Qt::Gui + Qt::IviCore +) + +install(TARGETS imports + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/ivicore/qface-tutorial/chapter3-simulation-backend/instrument-cluster/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/instrument-cluster/CMakeLists.txt new file mode 100644 index 0000000..b9b4e7e --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter3-simulation-backend/instrument-cluster/CMakeLists.txt @@ -0,0 +1,140 @@ +# Generated from instrument-cluster.pro. + +cmake_minimum_required(VERSION 3.14) +project(chapter3-simulation-backend 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}/ivicore/qface-tutorial/chapter3-simulation-backend") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS Quick) + +qt_add_executable(chapter3-simulation-backend + main.cpp +) +set_target_properties(chapter3-simulation-backend PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE FALSE +) +target_include_directories(chapter3-simulation-backend PUBLIC + ${CMAKE_CURRENT_BINARY_DIR}/../frontend +) + +target_link_libraries(chapter3-simulation-backend PUBLIC + # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../ + Qt::Core + Qt::Gui + Qt::Qml + Qt::Quick +) + + +# Resources: +set(app_resource_files + "Cluster.qml" + "Dial.qml" + "Fuel.qml" + "Label.qml" + "LeftDial.qml" + "RightDial.qml" + "Top.qml" +) + +qt6_add_resources(chapter3-simulation-backend "app" + PREFIX + "/" + FILES + ${app_resource_files} +) +set_source_files_properties("../../images/+--.png" + PROPERTIES QT_RESOURCE_ALIAS "+--.png" +) +set_source_files_properties("../../images/P-R-N-D.png" + PROPERTIES QT_RESOURCE_ALIAS "P-R-N-D.png" +) +set_source_files_properties("../../images/dial_cursor.png" + PROPERTIES QT_RESOURCE_ALIAS "dial_cursor.png" +) +set_source_files_properties("../../images/dial_cursor_right.png" + PROPERTIES QT_RESOURCE_ALIAS "dial_cursor_right.png" +) +set_source_files_properties("../../images/dial_fill_color.png" + PROPERTIES QT_RESOURCE_ALIAS "dial_fill_color.png" +) +set_source_files_properties("../../images/dial_fill_color_left.png" + PROPERTIES QT_RESOURCE_ALIAS "dial_fill_color_left.png" +) +set_source_files_properties("../../images/dial_pattern.png" + PROPERTIES QT_RESOURCE_ALIAS "dial_pattern.png" +) +set_source_files_properties("../../images/fuel.png" + PROPERTIES QT_RESOURCE_ALIAS "fuel.png" +) +set_source_files_properties("../../images/fuel_level.png" + PROPERTIES QT_RESOURCE_ALIAS "fuel_level.png" +) +set_source_files_properties("../../images/fuelsymbol_orange.png" + PROPERTIES QT_RESOURCE_ALIAS "fuelsymbol_orange.png" +) +set_source_files_properties("../../images/left_dial.png" + PROPERTIES QT_RESOURCE_ALIAS "left_dial.png" +) +set_source_files_properties("../../images/mask_overlay.png" + PROPERTIES QT_RESOURCE_ALIAS "mask_overlay.png" +) +set_source_files_properties("../../images/middle-bkg.png" + PROPERTIES QT_RESOURCE_ALIAS "middle-bkg.png" +) +set_source_files_properties("../../images/middle-circle.png" + PROPERTIES QT_RESOURCE_ALIAS "middle-circle.png" +) +set_source_files_properties("../../images/right_dial.png" + PROPERTIES QT_RESOURCE_ALIAS "right_dial.png" +) +set_source_files_properties("../../images/top_bar.png" + PROPERTIES QT_RESOURCE_ALIAS "top_bar.png" +) +set(images_resource_files + "+--.png" + "P-R-N-D.png" + "dial_cursor.png" + "dial_cursor_right.png" + "dial_fill_color.png" + "dial_fill_color_left.png" + "dial_pattern.png" + "fuel.png" + "fuel_level.png" + "fuelsymbol_orange.png" + "left_dial.png" + "mask_overlay.png" + "middle-bkg.png" + "middle-circle.png" + "right_dial.png" + "top_bar.png" +) + +qt6_add_resources(chapter3-simulation-backend "images" + PREFIX + "/images" + BASE + "../../images" + FILES + ${images_resource_files} +) + +install(TARGETS chapter3-simulation-backend + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |