Prospective fix for macos ctest not finding Qt

Not sure how this could happen, but we should be able to limit the rpath workaround to Linux
This commit is contained in:
Simon Hausmann 2021-03-17 08:52:52 +01:00
parent 29f930d733
commit c68405d4dd

View file

@ -137,5 +137,9 @@ 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 ${CMAKE_CURRENT_BINARY_DIR}/api_tests) add_test(api_tests ${CMAKE_CURRENT_BINARY_DIR}/api_tests)
# Somehow the wrong relative rpath ends up in the binary, requiring us to change the
# working directory.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set_property(TEST api_tests PROPERTY WORKING_DIRECTORY "${CMAKE_BINARY_DIR}") set_property(TEST api_tests PROPERTY WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
endif() endif()
endif()