diff options
author | Dominik Holland <dominik.holland@qt.io> | 2021-02-17 17:34:35 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2021-05-10 17:28:11 +0200 |
commit | 8e3d637e7776638149119bd62f459178cbca2955 (patch) | |
tree | 077f7a597039a05555da2c2fe33c1535227dd35e /examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt | |
parent | eac2590d4266e234f0f2ec4d261d940b14dd79bf (diff) |
cmake integration of the ivigenerator
Rerun pro2cmake.py for all examples and tests.
Ivigenerator based tests and examples are compiling
fine, but the cmake files need to be reworked to be
also able to run them.
Task-number: AUTOSUITE-1633
Change-Id: Icb95ecfa62ecb319d042dc30ea9f643b69a4aacf
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt')
-rw-r--r-- | examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt new file mode 100644 index 0000000..15105dc --- /dev/null +++ b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/CMakeLists.txt @@ -0,0 +1,65 @@ +# Generated from simulation_server.pro. + +cmake_minimum_required(VERSION 3.14) +project(chapter5-ipc-server 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/chapter5-ipc/simulation_server") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS IviCore) + +qt_add_executable(chapter5-ipc-server) + +# IVI Generator: +qt6_ivigenerator(chapter5-ipc-server + QFACE_SOURCES ../instrument-cluster.qface + QFACE_FORMAT server_qtro_simulator +) +set_target_properties(chapter5-ipc-server PROPERTIES + WIN32_EXECUTABLE TRUE + MACOSX_BUNDLE FALSE +) +target_include_directories(chapter5-ipc-server PUBLIC + ${CMAKE_CURRENT_BINARY_DIR}/../frontend +) + +target_link_libraries(chapter5-ipc-server PUBLIC + # Remove: L${CMAKE_CURRENT_BINARY_DIR}/../ + # Remove: gui + Qt::Core + Qt::IviCore +) + + +# Resources: +set_source_files_properties("../backend_simulator/simulation.qml" + PROPERTIES QT_RESOURCE_ALIAS "simulation.qml" +) +set(simulation_resource_files + "simulation.qml" +) + +qt6_add_resources(chapter5-ipc-server "simulation" + PREFIX + "/" + BASE + "../backend_simulator" + FILES + ${simulation_resource_files} +) + +install(TARGETS chapter5-ipc-server + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |