see PR merged https://gitlab.com/lspies/photoqt/-/merge_requests/44.patch fix test w/o mpv installed Amend photoqt_testscripts_SOURCES with SOURCES_LIBMPV, mirroring photoqt_SOURCES logic. --- a/CMake/ListFilesTesting.cmake +++ b/CMake/ListFilesTesting.cmake @@ -117,9 +117,6 @@ SET(photoqt_testscripts_SOURCES ######################################################################## ######################################################################## - ../../cplusplus/other/pqc_mpvobject.cpp - - ../../cplusplus/header/pqc_mpvobject.h ../../cplusplus/header/pqc_imageformats_qml.h ../../cplusplus/header/pqc_filefoldermodel.h ../../cplusplus/header/pqc_metadata.h @@ -156,4 +153,7 @@ SET(photoqt_testscripts_SOURCES # ../../cplusplus/header/scripts/pqc_scriptschromecast_qml.h ) +SET(photoqt_testscripts_SOURCES_LIBMPV ../../cplusplus/other/pqc_mpvobject.cpp + ../../cplusplus/header/pqc_mpvobject.h) + endif() --- a/testing/pqt_filefoldermodel/CMakeLists.txt +++ b/testing/pqt_filefoldermodel/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsclipboard/CMakeLists.txt +++ b/testing/pqt_scriptsclipboard/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsconfig/CMakeLists.txt +++ b/testing/pqt_scriptsconfig/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsfiledialog/CMakeLists.txt +++ b/testing/pqt_scriptsfiledialog/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsfilemanagement/CMakeLists.txt +++ b/testing/pqt_scriptsfilemanagement/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsfilespaths/CMakeLists.txt +++ b/testing/pqt_scriptsfilespaths/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif() --- a/testing/pqt_scriptsimages/CMakeLists.txt +++ b/testing/pqt_scriptsimages/CMakeLists.txt @@ -81,6 +81,7 @@ if(_WITH_VIDEO_QT) endif() if(_WITH_VIDEO_MPV) + SET(photoqt_testscripts_SOURCES ${photoqt_testscripts_SOURCES} ${photoqt_testscripts_SOURCES_LIBMPV}) target_compile_definitions(${testname} PRIVATE PQMVIDEOMPV) target_link_libraries(${testname} PRIVATE Libmpv::Libmpv) endif()