diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2b22b1a815e8..43e6c5275ab9 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -124,9 +124,7 @@ jobs: # Ubuntu 24.04 should use the CMake version from the repos. if: runner.os == 'macOS' with: - # This should always match the minimum required version in - # our CMakeLists.txt - cmake-version: "3.21.x" + cmake-version: "3.22.x" - name: "[Windows] Set up cmake" uses: jwlawson/actions-setup-cmake@v2.0 @@ -134,10 +132,7 @@ jobs: # On windows-11-arm this action installs the x64 version which has unwanted side effects if: matrix.os == 'windows-2022' with: - # This is a workaround for a SSL false positive in cmake 3.26.4 - # When downloading the manual. 3.21 is required for installing the - # ANGLE Dlls via IMPORTED_RUNTIME_ARTIFACTS - cmake-version: "3.21.x" + cmake-version: "3.22.x" - name: "[Windows] Set up MSVC Developer Command Prompt" if: runner.os == 'Windows' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07c4d3494b3e..61d1d694703d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,9 +234,7 @@ jobs: # Ubuntu 24.04 should use the CMake version from the repos. if: runner.os == 'macOS' with: - # This should always match the minimum required version in - # our CMakeLists.txt - cmake-version: "3.21.x" + cmake-version: "3.22.x" - name: "[Windows] Set up cmake" uses: jwlawson/actions-setup-cmake@v2.1 @@ -244,10 +242,7 @@ jobs: # On windows-11-arm this action installs the x64 version which has unwanted side effects if: matrix.os == 'windows-2022' with: - # This is a workaround for a SSL false positive in cmake 3.26.4 - # When downloading the manual. 3.21 is required for installing the - # ANGLE Dlls via IMPORTED_RUNTIME_ARTIFACTS - cmake-version: "3.21.x" + cmake-version: "3.22.x" - name: "[Windows] Set up MSVC Developer Command Prompt" if: runner.os == 'Windows' diff --git a/CMakeLists.txt b/CMakeLists.txt index 291a2f60aaf8..272e187262d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.21) +# Minimum version is aligned with the current Qt's minimum requirements via VCPKG +cmake_minimum_required(VERSION 3.22) # lint_cmake: -readability/wonkycase message(STATUS "CMAKE_VERSION: ${CMAKE_VERSION}") @@ -2744,11 +2745,11 @@ endif() # FFmpeg support # FFmpeg is multimedia library that can be found http://ffmpeg.org/ -find_package(FFMPEG COMPONENTS libavcodec libavformat libavutil libswresample) -default_option(FFMPEG "FFmpeg support (version 4.1.9 or later)" "FFMPEG_FOUND") -if(FFMPEG) - if(NOT FFMPEG_FOUND) - message(FATAL_ERROR "FFMPEG was not found") +find_package(FFmpeg COMPONENTS libavcodec libavformat libavutil libswresample) +default_option(FFmpeg "FFmpeg support (version 4.1.9 or later)" "FFmpeg_FOUND") +if(FFmpeg) + if(NOT FFmpeg_FOUND) + message(FATAL_ERROR "FFmpeg was not found") endif() # Check minimum required versions @@ -2756,39 +2757,39 @@ if(FFMPEG) # Windows: Version numbers are not available!? # macOS: Untested if( - FFMPEG_libavcodec_VERSION - AND FFMPEG_libavcodec_VERSION VERSION_LESS 58.35.100 + FFmpeg_libavcodec_VERSION + AND FFmpeg_libavcodec_VERSION VERSION_LESS 58.35.100 ) message( FATAL_ERROR - "FFmpeg support requires at least version 58.35.100 of libavcodec (found: ${FFMPEG_libavcodec_VERSION})." + "FFmpeg support requires at least version 58.35.100 of libavcodec (found: ${FFmpeg_libavcodec_VERSION})." ) endif() if( - FFMPEG_libavformat_VERSION - AND FFMPEG_libavformat_VERSION VERSION_LESS 58.20.100 + FFmpeg_libavformat_VERSION + AND FFmpeg_libavformat_VERSION VERSION_LESS 58.20.100 ) message( FATAL_ERROR - "FFmpeg support requires at least version 58.20.100 of libavformat (found: ${FFMPEG_libavformat_VERSION})." + "FFmpeg support requires at least version 58.20.100 of libavformat (found: ${FFmpeg_libavformat_VERSION})." ) endif() if( - FFMPEG_libavutil_VERSION - AND FFMPEG_libavutil_VERSION VERSION_LESS 56.22.100 + FFmpeg_libavutil_VERSION + AND FFmpeg_libavutil_VERSION VERSION_LESS 56.22.100 ) message( FATAL_ERROR - "FFmpeg support requires at least version 56.22.100 of libavutil (found: ${FFMPEG_libavutil_VERSION})." + "FFmpeg support requires at least version 56.22.100 of libavutil (found: ${FFmpeg_libavutil_VERSION})." ) endif() if( - FFMPEG_libswresample_VERSION - AND FFMPEG_libswresample_VERSION VERSION_LESS 3.3.100 + FFmpeg_libswresample_VERSION + AND FFmpeg_libswresample_VERSION VERSION_LESS 3.3.100 ) message( FATAL_ERROR - "FFmpeg support requires at least version 3.3.100 of libswresample (found: ${FFMPEG_libswresample_VERSION})." + "FFmpeg support requires at least version 3.3.100 of libswresample (found: ${FFmpeg_libswresample_VERSION})." ) endif() @@ -2796,21 +2797,21 @@ if(FFMPEG) target_compile_definitions( mixxx-lib PUBLIC - __FFMPEG__ + __FFmpeg__ # Needed to build new FFmpeg __STDC_CONSTANT_MACROS __STDC_LIMIT_MACROS __STDC_FORMAT_MACROS ) - target_link_libraries(mixxx-lib PRIVATE "${FFMPEG_LIBRARIES}") - target_include_directories(mixxx-lib PUBLIC "${FFMPEG_INCLUDE_DIRS}") + target_link_libraries(mixxx-lib PRIVATE "${FFmpeg_LIBRARIES}") + target_include_directories(mixxx-lib PUBLIC "${FFmpeg_INCLUDE_DIRS}") endif() # STEM file support -default_option(STEM "STEM file support" "FFMPEG_FOUND;FFMPEG") +default_option(STEM "STEM file support" "FFmpeg_FOUND;FFmpeg") if(STEM) - if(NOT FFMPEG) - message(FATAL_ERROR "STEM requires that also FFMPEG is enabled") + if(NOT FFmpeg) + message(FATAL_ERROR "STEM requires that also FFmpeg is enabled") endif() target_compile_definitions(mixxx-lib PUBLIC __STEM__) list(APPEND MIXXX_LIB_PRECOMPILED_HEADER src/track/steminfo.h) @@ -3207,6 +3208,10 @@ if(ENGINEPRIME) # statically. This situation should be reviewed once libdjinterop hits version 1.x. set(LIBDJINTEROP_VERSION 0.27.0) # Look whether an existing installation of libdjinterop matches the required version. + if(DEFINED ENV{MIXXX_VCPKG_ROOT} OR DEFINED MIXXX_VCPKG_ROOT) + # On the VCPKG version, DjInterop has devendored dependencies, see https://github.com/microsoft/vcpkg/pull/50062 + find_package(date CONFIG REQUIRED) + endif() find_package(DjInterop ${LIBDJINTEROP_VERSION} EXACT CONFIG) if(NOT DjInterop_FOUND) find_package(DjInterop ${LIBDJINTEROP_VERSION} EXACT MODULE) diff --git a/src/test/controllerscriptenginelegacy_test.cpp b/src/test/controllerscriptenginelegacy_test.cpp index c98d9e57de14..9c5c1c6eddd4 100644 --- a/src/test/controllerscriptenginelegacy_test.cpp +++ b/src/test/controllerscriptenginelegacy_test.cpp @@ -16,6 +16,7 @@ #include "control/controlobject.h" #include "control/controlpotmeter.h" #include "controllers/scripting/legacy/controllerscriptinterfacelegacy.h" +#include "util/assert.h" #ifdef MIXXX_USE_QML #include @@ -68,7 +69,8 @@ class ControllerScriptEngineLegacyTest : public ControllerScriptEngineLegacy, static ScopedTemporaryFile makeTemporaryFile(const QString& contents) { QByteArray contentsBa = contents.toLocal8Bit(); ScopedTemporaryFile pFile = std::make_unique(); - pFile->open(); + [[maybe_unused]] bool result = pFile->open(); + DEBUG_ASSERT(result); pFile->write(contentsBa); pFile->close(); return pFile; diff --git a/src/test/taglibtest.cpp b/src/test/taglibtest.cpp index 5dbe57a7e7c4..b32b735e3d84 100644 --- a/src/test/taglibtest.cpp +++ b/src/test/taglibtest.cpp @@ -91,7 +91,9 @@ TEST_F(TagLibTest, WriteID3v2TagViaLink) { auto linkFileInfoBefore = QFileInfo(linkFileName); EXPECT_TRUE(linkFileInfoBefore.exists()); EXPECT_TRUE(linkFileInfoBefore.isSymLink()); - EXPECT_EQ(linkFileInfoBefore.canonicalFilePath().toStdString(), tmpFileName.toStdString()); + auto canonicalTmpFileName = QFileInfo(tmpFileName).canonicalFilePath(); + EXPECT_EQ(linkFileInfoBefore.canonicalFilePath().toStdString(), + canonicalTmpFileName.toStdString()); // Verify that the file has no tags { @@ -127,7 +129,8 @@ TEST_F(TagLibTest, WriteID3v2TagViaLink) { auto linkFileInfoAfter = QFileInfo(linkFileName); EXPECT_TRUE(linkFileInfoAfter.exists()); - EXPECT_EQ(linkFileInfoAfter.canonicalFilePath().toStdString(), tmpFileName.toStdString()); + EXPECT_EQ(linkFileInfoAfter.canonicalFilePath().toStdString(), + canonicalTmpFileName.toStdString()); EXPECT_TRUE(linkFileInfoAfter.isSymLink()); } #endif diff --git a/tools/android_buildenv.sh b/tools/android_buildenv.sh index 98e56bf05db2..d69aeb582db5 100755 --- a/tools/android_buildenv.sh +++ b/tools/android_buildenv.sh @@ -36,8 +36,8 @@ if [ "$HOST_ARCH" == "x86_64" ]; then else VCPKG_TARGET_TRIPLET="arm64-android" BUILDENV_BRANCH="2.7" - BUILDENV_NAME="mixxx-deps-2.7-arm64-android-458eeaf4" - BUILDENV_SHA256="77ad7e5e0178bc62f22c458c8d6e0ee5e7482305f18f8099775aa794ac2745b4" + BUILDENV_NAME="mixxx-deps-2.7-arm64-android-0ef543ab" + BUILDENV_SHA256="e7634224e3f67f0d909e652671b14544e8c17a8d036bf8b63063e9baa40fb007" fi else echo "ERROR: Unsupported architecture detected: $HOST_ARCH" diff --git a/tools/macos_buildenv.sh b/tools/macos_buildenv.sh index 867914f04c0b..078de9dd8529 100755 --- a/tools/macos_buildenv.sh +++ b/tools/macos_buildenv.sh @@ -33,39 +33,39 @@ if [ "$HOST_ARCH" = "x86_64" ]; then if [ -n "${BUILDENV_ARM64_CROSS}" ]; then if [ -n "${BUILDENV_RELEASE}" ]; then VCPKG_TARGET_TRIPLET="arm64-osx-min1100-release" - BUILDENV_BRANCH="2.6-rel" - BUILDENV_NAME="mixxx-deps-2.6-arm64-osx-cross-rel-541a925" - BUILDENV_SHA256="42a663c70426ecf9576ce9889d2b24c0aaf1ecfb44fef97a745c4f758bf397a3" + BUILDENV_BRANCH="2.7-rel" + BUILDENV_NAME="mixxx-deps-2.7-arm64-osx-cross-rel-a4db5de0" + BUILDENV_SHA256="3f23cb3ab69c00686fcf4ecbbe7ffc31be416e14988b26ee4178bee2f117ab13" else VCPKG_TARGET_TRIPLET="arm64-osx-min1100" - BUILDENV_BRANCH="2.6" - BUILDENV_NAME="mixxx-deps-2.6-arm64-osx-cross-6a4e01e" - BUILDENV_SHA256="39ec4249f601e4764b07ba2c8a6b27887c9a8c676d5e8d326035489af967ceac" + BUILDENV_BRANCH="2.7" + BUILDENV_NAME="mixxx-deps-2.7-arm64-osx-cross-0ef543ab" + BUILDENV_SHA256="c0ea20df37f3b5cb543be81550d1a41eb34c0e03a80a40403815b2585d52dc21" fi else if [ -n "${BUILDENV_RELEASE}" ]; then VCPKG_TARGET_TRIPLET="x64-osx-min1100-release" - BUILDENV_BRANCH="2.6-rel" - BUILDENV_NAME="mixxx-deps-2.6-x64-osx-rel-541a925" - BUILDENV_SHA256="0aa4ba8850d948b58abc83fd9cdfa9cf65c63ebce35a87e19b6ab5bc14d3abeb" + BUILDENV_BRANCH="2.7-rel" + BUILDENV_NAME="mixxx-deps-2.7-x64-osx-rel-a4db5de0" + BUILDENV_SHA256="0a95df0d0b0dac7149484661c6c952e50b2cb2f7c22359e1def041e41bd62016" else VCPKG_TARGET_TRIPLET="x64-osx-min1100" - BUILDENV_BRANCH="2.6" - BUILDENV_NAME="mixxx-deps-2.6-x64-osx-6a4e01e" - BUILDENV_SHA256="1d12b5f496598fb2d740ac6b5fe540b2256556554b9b6db58846aa14f94c54b2" + BUILDENV_BRANCH="2.7" + BUILDENV_NAME="mixxx-deps-2.7-x64-osx-0ef543ab" + BUILDENV_SHA256="e33cc0de3aa5987cb640b5173f4e53597548f4c783ad41552faaf14f100c25c7" fi fi elif [ "$HOST_ARCH" = "arm64" ]; then if [ -n "${BUILDENV_RELEASE}" ]; then VCPKG_TARGET_TRIPLET="arm64-osx-min1100-release" - BUILDENV_BRANCH="2.6-rel" - BUILDENV_NAME="mixxx-deps-2.6-arm64-osx-rel-541a925" - BUILDENV_SHA256="7c160d441802a891092b4e16f7429f32ae7eeed95b4eff5bf2ed403b796b5355" + BUILDENV_BRANCH="2.7-rel" + BUILDENV_NAME="mixxx-deps-2.7-arm64-osx-rel-a4db5de0" + BUILDENV_SHA256="c232ff5ccdeb227311c52bdaafc9451ab94278bec3e7bd057a4454406ac6470f" else VCPKG_TARGET_TRIPLET="arm64-osx-min1100" - BUILDENV_BRANCH="2.6" - BUILDENV_NAME="mixxx-deps-2.6-arm64-osx-6a4e01e" - BUILDENV_SHA256="b883799559b8621af5fa799e7784d1ee0ce9e573e4fed22c846e197eaf5a275b" + BUILDENV_BRANCH="2.7" + BUILDENV_NAME="mixxx-deps-2.7-arm64-osx-0ef543ab" + BUILDENV_SHA256="9281df2772120f0d52eb0d0e56b6c5c5bd535b473c8aedd7ac1469aca32d3318" fi else echo "ERROR: Unsupported architecture detected: $HOST_ARCH" diff --git a/tools/windows_buildenv.bat b/tools/windows_buildenv.bat index 65b72f241506..956399f3c342 100644 --- a/tools/windows_buildenv.bat +++ b/tools/windows_buildenv.bat @@ -34,27 +34,27 @@ IF NOT DEFINED INSTALL_ROOT ( IF /I "%PLATFORM%"=="arm64" ( IF DEFINED BUILDENV_RELEASE ( - SET BUILDENV_BRANCH=2.6-rel + SET BUILDENV_BRANCH=2.7-rel SET VCPKG_TARGET_TRIPLET=arm64-windows-release - SET BUILDENV_NAME=mixxx-deps-2.6-arm64-windows-rel-541a925 - SET BUILDENV_SHA256=ae9ac857fd8119b18da0116fe3c4239d938f3efba6b3baad46c8f3f62042942c + SET BUILDENV_NAME=mixxx-deps-2.7-arm64-windows-rel-a4db5de0 + SET BUILDENV_SHA256=f96290f99dd1734b321853e06a22cae20ed50383bee69253297c6ffbd7a37874 ) ELSE ( - SET BUILDENV_BRANCH=2.6 + SET BUILDENV_BRANCH=2.7 SET VCPKG_TARGET_TRIPLET=arm64-windows - SET BUILDENV_NAME=mixxx-deps-2.6-arm64-windows-6a4e01e - SET BUILDENV_SHA256=7ab9bf4fc18ac72a6bf4cf2b440eb0972591f9c1e0b031ecd3177633c235c3b6 + SET BUILDENV_NAME=mixxx-deps-2.7-arm64-windows-0ef543ab + SET BUILDENV_SHA256=e0a5d168790601ee4170f533b8e54f6c7cabe219d9956bc034a5e2c69d2944c1 ) ) ELSE IF /I "%PLATFORM%"=="x64" ( IF DEFINED BUILDENV_RELEASE ( - SET BUILDENV_BRANCH=2.6-rel + SET BUILDENV_BRANCH=2.7-rel SET VCPKG_TARGET_TRIPLET=x64-windows-release - SET BUILDENV_NAME=mixxx-deps-2.6-x64-windows-rel-541a925 - SET BUILDENV_SHA256=2bf68831539271050ad19a74d0ed881c9d15f1c8ac0b3cb3b84cf58e7ab6dbd3 + SET BUILDENV_NAME=mixxx-deps-2.7-x64-windows-rel-a4db5de0 + SET BUILDENV_SHA256=3d38e93f3c64b8ae2e3f5947a0790e5566489409d21ec15230195590d93661d1 ) ELSE ( - SET BUILDENV_BRANCH=2.6 + SET BUILDENV_BRANCH=2.7 SET VCPKG_TARGET_TRIPLET=x64-windows - SET BUILDENV_NAME=mixxx-deps-2.6-x64-windows-6a4e01e - SET BUILDENV_SHA256=034ba4f49660947819864f3ff3ee1a5cc494187876a62366346783cdf28ddf36 + SET BUILDENV_NAME=mixxx-deps-2.7-x64-windows-0ef543ab + SET BUILDENV_SHA256=27407f2139026c46830699dec2ca1a1d35d128127184518b2f57da1da509dc2a ) ) ELSE ( ECHO ^ERROR: Unsupported PLATFORM: %PLATFORM%