Workaround test problem

Looks like the test executable need to be run from the cmake root build directory,
because it hardcodes a relative path to the library  api/sixtyfps-cpp/libsixtyfps_cpp.so
This might actually be a corrosion bug.
This commit is contained in:
Olivier Goffart 2021-03-16 19:49:29 +01:00
parent a0d219b14c
commit 29f930d733

View file

@ -136,5 +136,6 @@ if(BUILD_TESTING)
add_executable(api_tests tests/tests.cpp) add_executable(api_tests tests/tests.cpp)
target_link_libraries(api_tests PRIVATE SixtyFPS Catch2::Catch2) target_link_libraries(api_tests PRIVATE SixtyFPS Catch2::Catch2)
add_test(api_tests api_tests) add_test(api_tests ${CMAKE_CURRENT_BINARY_DIR}/api_tests)
set_property(TEST api_tests PROPERTY WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
endif() endif()