From c738669619fa015e9d8f62e0e3d13cd6e117d8cf Mon Sep 17 00:00:00 2001 From: Vladayslav Goncharuk Date: Sun, 7 Jul 2024 16:53:58 +0300 Subject: [PATCH] [ISSUE #202] DMA is not executed on Windows OS This patch slightly modifies the artifacts installation rules for the Windows OS to ensure sucessful execution of the DLT Message Analyzer plugin from within the 'DltViewerSDKQt6' or 'DltViewerSDKQt5' folder. Signed-off-by: Vladayslav Goncharuk --- dltmessageanalyzerplugin/src/CMakeLists.txt | 29 ++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/dltmessageanalyzerplugin/src/CMakeLists.txt b/dltmessageanalyzerplugin/src/CMakeLists.txt index 3929673..afa712b 100644 --- a/dltmessageanalyzerplugin/src/CMakeLists.txt +++ b/dltmessageanalyzerplugin/src/CMakeLists.txt @@ -83,7 +83,14 @@ DMA_sync_g_test_framework() DMA_sync_plantuml() DMA_sync_framework() DMA_sync_q_custom_plot() -install(TARGETS qcustomplot LIBRARY DESTINATION ${DLT_LIBRARY_INSTALLATION_PATH} ) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + install(TARGETS qcustomplot LIBRARY DESTINATION ${DLT_LIBRARY_INSTALLATION_PATH} ) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") + install(TARGETS qcustomplot RUNTIME DESTINATION ${DLT_EXECUTABLE_INSTALLATION_PATH} ) +elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + install(TARGETS qcustomplot LIBRARY DESTINATION ${DLT_LIBRARY_INSTALLATION_PATH} ) +endif() + ################### DEPENDENCIES ( END )################### ################### COMPATIBILITY ######################### @@ -191,4 +198,24 @@ add_custom_command(TARGET DLT-Message-Analyzer POST_BUILD target_link_libraries(DLT-Message-Analyzer qdlt ${QT_PREFIX}::Widgets ) ################### QT ( END ) ############################ +########## ENSURE INSTALLATION OF QT DEPENDENCIES ######### +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + # used by the DLT Message Analyzer itself + find_package(${QT_PREFIX} REQUIRED COMPONENTS Svg) + # used by qcustomplot + find_package(${QT_PREFIX} REQUIRED COMPONENTS PrintSupport) + set(QT_LIBS + ${QT_PREFIX}::Svg + ${QT_PREFIX}::PrintSupport) + + foreach(QT_LIB IN ITEMS ${QT_LIBS}) + get_target_property(LIBRARY_PATH ${QT_LIB} LOCATION) + install(FILES + "${LIBRARY_PATH}" + DESTINATION "${DLT_EXECUTABLE_INSTALLATION_PATH}" + COMPONENT qt_libraries) + endforeach() +endif() +####### ENSURE INSTALLATION OF QT DEPENDENCIES ( END ) #### + add_plugin(DLT-Message-Analyzer)