Skip to content

Commit

Permalink
Copy missing dlls to be able to run examplkes and tests. Windows only…
Browse files Browse the repository at this point in the history
… change.
  • Loading branch information
przemek83 committed Dec 11, 2024
1 parent afcdf78 commit 54d40f4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ qt_add_resources(${PROJECT_EXAMPLES}_SOURCES examplesResources.qrc)
add_executable(${PROJECT_EXAMPLES} ${${PROJECT_EXAMPLES}_SOURCES})

target_link_libraries(${PROJECT_EXAMPLES} PRIVATE eible Qt6::Core Qt6::Widgets QuaZip)

if (WIN32)
add_custom_command(TARGET ${PROJECT_EXAMPLES} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/install/bin" "$<TARGET_FILE_DIR:${PROJECT_EXAMPLES}>")
add_custom_command(TARGET ${PROJECT_EXAMPLES} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"$<TARGET_FILE_DIR:QuaZip>" "$<TARGET_FILE_DIR:${PROJECT_EXAMPLES}>")
endif()
9 changes: 9 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ add_executable(${PROJECT_TESTS} ${${PROJECT_TESTS}_SOURCES})

target_link_libraries(${PROJECT_TESTS} PRIVATE eible Qt6::Core Qt6::Widgets Qt6::Test QuaZip)

if (WIN32)
add_custom_command(TARGET ${PROJECT_TESTS} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_BINARY_DIR}/../zlib/install/bin" "$<TARGET_FILE_DIR:${PROJECT_TESTS}>")
add_custom_command(TARGET ${PROJECT_TESTS} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"$<TARGET_FILE_DIR:QuaZip>" "$<TARGET_FILE_DIR:${PROJECT_TESTS}>")
endif()

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


0 comments on commit 54d40f4

Please sign in to comment.