Files
Schedule/client/tests/CMakeLists.txt
T
Misaki 555371a4e0 build: deploy Qt runtime for Windows builds
Run windeployqt as a post-build step for Schedule, copy MinGW runtime DLLs, and place Windows test binaries next to the deployed Qt runtime.
2026-10-26 14:54:22 +08:00

54 lines
2.4 KiB
CMake

add_executable(test_storage test_storage.cpp)
target_link_libraries(test_storage PRIVATE schedule_core Qt6::Test schedule_warnings)
add_test(NAME storage COMMAND test_storage)
add_executable(test_services test_services.cpp)
target_link_libraries(test_services PRIVATE schedule_services Qt6::Test schedule_warnings)
add_test(NAME services COMMAND test_services)
add_executable(test_grid test_grid.cpp)
target_link_libraries(test_grid PRIVATE schedule_ui Qt6::Test schedule_warnings)
add_test(NAME grid COMMAND test_grid)
add_executable(test_mainwindow test_mainwindow.cpp)
target_link_libraries(test_mainwindow PRIVATE schedule_ui Qt6::Test schedule_warnings)
add_test(NAME mainwindow COMMAND test_mainwindow)
add_executable(test_compactwindow test_compactwindow.cpp)
target_link_libraries(test_compactwindow PRIVATE schedule_ui Qt6::Test schedule_warnings)
add_test(NAME compactwindow COMMAND test_compactwindow)
add_executable(test_config test_config.cpp)
target_link_libraries(test_config PRIVATE schedule_services Qt6::Test schedule_warnings)
add_test(NAME config COMMAND test_config)
add_executable(test_scheduler test_scheduler.cpp)
target_link_libraries(test_scheduler PRIVATE schedule_core Qt6::Test schedule_warnings)
add_test(NAME scheduler COMMAND test_scheduler)
add_executable(test_ai test_ai.cpp)
target_link_libraries(test_ai PRIVATE schedule_ai Qt6::Test schedule_warnings)
add_test(NAME ai COMMAND test_ai)
add_executable(test_openai_provider test_openai_provider.cpp)
target_link_libraries(test_openai_provider PRIVATE schedule_ai Qt6::Test schedule_warnings)
add_test(NAME openai_provider COMMAND test_openai_provider)
add_executable(test_sync_integration test_sync_integration.cpp)
target_link_libraries(test_sync_integration PRIVATE schedule_sync Qt6::Test schedule_warnings)
add_test(NAME sync_integration COMMAND test_sync_integration)
if(TARGET schedule-sync-server)
add_dependencies(test_sync_integration schedule-sync-server)
set_tests_properties(sync_integration PROPERTIES
ENVIRONMENT "SCHEDULE_SYNC_SERVER_BIN=${CMAKE_BINARY_DIR}/bin/schedule-sync-server${CMAKE_EXECUTABLE_SUFFIX}"
)
endif()
if(WIN32)
set_target_properties(
test_storage test_services test_grid test_mainwindow test_compactwindow
test_config test_scheduler test_ai test_openai_provider test_sync_integration
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
endif()