Skip to content

Commit

Permalink
tests: ensure plugin dlls are copied to their TestBin subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Nov 8, 2024
1 parent ab5fb9d commit 5035ac6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ target_include_directories(open-ephys PRIVATE ${JUCE_DIRECTORY} ${JUCE_DIRECTORY
target_compile_features(open-ephys PUBLIC cxx_auto_type cxx_generalized_initializers cxx_std_17)

if(BUILD_TESTS)
enable_testing()
add_definitions(-DBUILD_TESTS)
add_library(gui_testable_source SHARED ${JUCE_SOURCE})
if(MSVC)
Expand Down
10 changes: 6 additions & 4 deletions Plugins/PluginRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ if(BUILD_TESTS)
set_property(
TARGET ${PLUGIN_NAME}_tests PROPERTY RUNTIME_OUTPUT_DIRECTORY
${BIN_TESTS_DIR}/${PLUGIN_NAME})
# set_property(TARGET ${PLUGIN_NAME}_testable PROPERTY
# RUNTIME_OUTPUT_DIRECTORY ${BIN_TESTS_DIR}/${PLUGIN_NAME})
# set_property(TARGET ${PLUGIN_NAME}_testable PROPERTY
# LIBRARY_OUTPUT_DIRECTORY ${BIN_TESTS_DIR}/${PLUGIN_NAME})

add_custom_command(
TARGET ${PLUGIN_NAME}_tests
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PLUGIN_NAME}>
$<TARGET_FILE_DIR:${PLUGIN_NAME}_tests>)

add_custom_command(
TARGET ${PLUGIN_NAME}_tests
Expand Down

0 comments on commit 5035ac6

Please sign in to comment.