diff options
author | Be <be@mixxx.org> | 2021-02-03 11:58:27 -0600 |
---|---|---|
committer | Be <be@mixxx.org> | 2021-02-16 23:50:35 -0600 |
commit | 0c15373dc743e6c700659e062aac3056a1cf2f22 (patch) | |
tree | 655d6f10bf352af977f94468a07149e1807436d7 | |
parent | b115f873e80dd082d63d24c53565dd2b04ec65a2 (diff) |
CMake: copy libfdk-aac into Windows and macOS packages
-rw-r--r-- | .github/workflows/build.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd4745f84a..1b09165752 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,7 +109,7 @@ jobs: with: # This should always match the mininum required version in # our CMakeLists.txt - cmake-version: '3.13.x' + cmake-version: '3.15.x' - name: "[Windows] Install additional build tools" if: runner.os == 'Windows' diff --git a/CMakeLists.txt b/CMakeLists.txt index db50d5294f..61b31dc1f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.0) +cmake_minimum_required(VERSION 3.15.0) project(mixxx VERSION 2.3.0) set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org") set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.") @@ -2224,6 +2224,26 @@ if(FAAD) endif() endif() +# FDK-AAC is loaded dynamically at runtime by EncoderFdkAac using QLibrary, +# so copy it into the Windows and macOS packages, but do not link to it. +find_library(FDK_AAC_LIBRARY fdk-aac) +# On Windows find_library finds the .lib file, but the installer needs the .dll file. +find_file(FDK_AAC_DLL fdk-aac.dll PATH_SUFFIXES ${CMAKE_INSTALL_BINDIR}) +if(APPLE AND MACOS_BUNDLE AND FDK_AAC_LIBRARY) + message(STATUS "Found fdk-aac: ${FDK_AAC_LIBRARY}") + file(COPY ${FDK_AAC_LIBRARY} + DESTINATION ${MIXXX_INSTALL_PREFIX}/Contents/Frameworks + FOLLOW_SYMLINK_CHAIN + ) +elseif(WIN32 AND FDK_AAC_DLL) + message(STATUS "Found fdk-aac DLL: ${FDK_AAC_DLL}") + install(FILES ${FDK_AAC_DLL} DESTINATION ${MIXXX_INSTALL_BINDIR}) +elseif(FDK_AAC_LIBRARY) + message(STATUS "Found fdk-aac: ${FDK_AAC_LIBRARY}") +else() + message(STATUS "Could NOT find fdk-aac") +endif() + # FFmpeg 4.x support # FFmpeg is multimedia library that can be found http://ffmpeg.org/ find_package(FFMPEG COMPONENTS libavcodec libavformat libavutil libswresample) |