Test: [skip ci] fix build failure when linking Python statically

This commit is contained in:
wmayer
2022-12-05 15:34:58 +01:00
parent 60ae885471
commit 7bd0394f13

View File

@@ -55,6 +55,11 @@ function(SETUP_TESTS)
foreach(_testname ${ARGN})
add_executable(${_testname}_Tests_run src/${_testname}.cpp)
add_test(NAME ${_testname}_Tests_run COMMAND ${_testname}_Tests_run)
if(NOT BUILD_DYNAMIC_LINK_PYTHON)
list(APPEND ${_testname}_LIBS
${PYTHON_LIBRARIES}
)
endif()
target_link_libraries(${_testname}_Tests_run ${QtTest_LIBRARIES} ${${_testname}_LIBS})
endforeach()
endfunction()