Skip to content

Commit

Permalink
Copy qwt.dlls to tests and examples build directory to make it workin…
Browse files Browse the repository at this point in the history
…g locally and in workflows.
  • Loading branch information
przemek83 committed Dec 6, 2024
1 parent 4d47a8e commit ef734f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt.qwt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
)
6 changes: 6 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$<TARGET_FILE_DIR:${PROJECT_EXAMPLES}>")
endif()
6 changes: 6 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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" "$<TARGET_FILE_DIR:${PROJECT_TEST}>")
endif()

add_test(NAME ${PROJECT_TEST} COMMAND ${PROJECT_TEST})

0 comments on commit ef734f7

Please sign in to comment.