Skip to content

Commit

Permalink
Fix problem with building on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Sep 6, 2024
1 parent 2ac21d5 commit b6f65c5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,11 @@ add_executable(${PROJECT_TEST} ${${PROJECT_TEST}_SOURCES})
target_link_libraries(${PROJECT_TEST} PRIVATE Catch2::Catch2WithMain ${PROJECT_NAME}-lib)

IF (WIN32)
file(GLOB_RECURSE DLLS "${CMAKE_BINARY_DIR}/*.dll" )
message("--------- LIBS: ${DLLS}")
file(COPY ${DLLS} DESTINATION ${CMAKE_BINARY_DIR})
file(COPY ${DLLS} DESTINATION "${CMAKE_BINARY_DIR}/test/${CMAKE_BUILD_TYPE}")
message("--------- COMMAND")
execute_process(COMMAND dir "${CMAKE_BINARY_DIR}/test/${CMAKE_BUILD_TYPE}")

add_custom_command(TARGET ${PROJECT_TEST} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${FETCHCONTENT_BASE_DIR}/allegro-build/lib/" "$<TARGET_FILE_DIR:${PROJECT_TEST}>")
add_custom_command(TARGET ${PROJECT_TEST} POST_BUILD
COMMAND dir "${FETCHCONTENT_BASE_DIR}/allegro-build/lib/")
add_custom_command(TARGET ${PROJECT_TEST} POST_BUILD
COMMAND dir "${CMAKE_BINARY_DIR}/test/${CMAKE_BUILD_TYPE}")
ENDIF()

include(CTest)
include(Catch)
set(CMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE PRE_TEST)
catch_discover_tests(${PROJECT_TEST})

0 comments on commit b6f65c5

Please sign in to comment.