From 5040b15071b6d9d38e58dbd2ac9384a94f723318 Mon Sep 17 00:00:00 2001 From: barts Date: Thu, 15 Feb 2024 18:10:42 +0100 Subject: [PATCH] fix: Qtest was added as a file instead of a dependency. --- CMakeLists.txt | 7 +++++++ app/CMakeLists.txt | 12 +++--------- tests/CMakeLists.txt | 19 ++++++++++++++----- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f036f9..b39004c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,3 +29,10 @@ if(BUILD_TESTING) enable_testing() add_subdirectory(tests) endif() + + +set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_FULL}) +set(CPACK_GENERATOR "TGZ") + +include(CPack) diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 3bba7c0..50fe578 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -17,6 +17,9 @@ install( ".*libdbm\\.so.*" ".*libpthread\\.so.*") +# Copy the entrypoint to the install directory. +install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/run_snapshot DESTINATION .) + # When Qt is built as a shared library, the platform plugins must be installed # alongside the application in the platforms directory. if(QT6_LIB_TYPE STREQUAL "SHARED_LIBRARY") @@ -74,12 +77,3 @@ if(QT6_LIB_TYPE STREQUAL "SHARED_LIBRARY") PATTERN "libqxcb-.*-integration\\.*") endif() - -# Copy the entrypoint to the install directory. -install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/run_snapshot DESTINATION .) - -set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) -set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION_FULL}) -set(CPACK_GENERATOR "TGZ") - -include(CPack) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a7d5993..5a10a7d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,8 +19,17 @@ set_tests_properties(tests_bin PROPERTIES ENVIRONMENT install(TARGETS tests_bin DESTINATION .) install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/run_tests DESTINATION .) install(DIRECTORY static DESTINATION .) - -# When Qt is built as a shared library, the Qt6::Test must be added as well. -if(QT6_LIB_TYPE STREQUAL "SHARED_LIBRARY") - install(FILES $ DESTINATION .) -endif() +install( + TARGETS tests_bin + DESTINATION . + RUNTIME_DEPENDENCIES + DIRECTORIES + ${FFMPEG_LIBRARY_DIRS} + POST_EXCLUDE_REGEXES + # Compatability with standard C libraries across linux distributions is + # assumed. + ".*ld-linux.*\\.so.*" + ".*libc\\.so.*" + ".*libm\\.so.*" + ".*libdbm\\.so.*" + ".*libpthread\\.so.*")