From ef734f70b04d161aba4153cbe70206f145df57c3 Mon Sep 17 00:00:00 2001 From: Przemek <4788832+przemek83@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:37:54 +0100 Subject: [PATCH] Copy qwt.dlls to tests and examples build directory to make it working locally and in workflows. --- CMakeLists.txt.qwt | 2 +- examples/CMakeLists.txt | 6 ++++++ tests/CMakeLists.txt | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt.qwt b/CMakeLists.txt.qwt index b885cc7..7462093 100644 --- a/CMakeLists.txt.qwt +++ b/CMakeLists.txt.qwt @@ -9,7 +9,7 @@ ExternalProject_Add(qwt GIT_REPOSITORY https://git.code.sf.net/p/qwt/git GIT_TAG 9e554a5e03bc3a1fe379bdddfa4d21ced2ed7995 CONFIGURE_COMMAND qmake "${CMAKE_CURRENT_BINARY_DIR}/qwt/qwt/src/qwt/qwt.pro" - PATCH_COMMAND git apply "${CMAKE_CURRENT_SOURCE_DIR}/qwt.patch" + PATCH_COMMAND git apply --quiet "${CMAKE_CURRENT_SOURCE_DIR}/qwt.patch" BUILD_COMMAND "@QWT_BUILD_COMMAND@" INSTALL_COMMAND "" ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 41ac219..4857198 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -6,3 +6,9 @@ set(${PROJECT_EXAMPLES}_SOURCES add_executable(${PROJECT_EXAMPLES} ${${PROJECT_EXAMPLES}_SOURCES}) target_link_libraries(${PROJECT_EXAMPLES} PRIVATE qwtble Qt6::Test Qt6::Widgets) + +if (WIN32) + add_custom_command(TARGET ${PROJECT_EXAMPLES} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_BINARY_DIR}/../qwt/install/lib" "$") +endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e7c2572..bd77969 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,4 +13,10 @@ set(${PROJECT_TEST}_SOURCES add_executable(${PROJECT_TEST} ${${PROJECT_TEST}_SOURCES}) target_link_libraries(${PROJECT_TEST} PRIVATE qwtble Qt6::Test Qt6::Widgets) +if (WIN32) + add_custom_command(TARGET ${PROJECT_TEST} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_BINARY_DIR}/../qwt/install/lib" "$") +endif() + add_test(NAME ${PROJECT_TEST} COMMAND ${PROJECT_TEST})