Skip to content

Commit

Permalink
Merge branch 'main' of [email protected]:mixxxdj/mixxx.git into track-me…
Browse files Browse the repository at this point in the history
…tadata-sync
  • Loading branch information
uklotzde committed Sep 15, 2021
2 parents 77d3474 + a24a470 commit d0f45fc
Show file tree
Hide file tree
Showing 150 changed files with 73,645 additions and 74,068 deletions.
15 changes: 13 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,55 @@
"brace-style": ["warn", "1tbs", {
"allowSingleLine": true
}],
"curly": "warn",
"camelcase": "warn",
"comma-spacing": "warn",
"computed-property-spacing" : ["warn", "never", {
"enforceForClassMembers": true
}],
"dot-location": "warn",
"dot-notation": "warn",
"eqeqeq": ["error", "always"],
"func-call-spacing": "warn",
"func-style": ["error", "expression", {
"allowArrowFunctions": true
}],
"indent": ["warn", 4],
"key-spacing": "warn",
"keyword-spacing": "warn",
"linebreak-style": ["warn", "unix"],
"no-constructor-return": "warn",
"no-extra-bind": "warn",
"no-sequences": "warn",
"no-useless-call": "warn",
"no-useless-return": "warn",
"no-trailing-spaces": "warn",
"no-unneeded-ternary": ["warn", {
"defaultAssignment": false
}],
"no-unused-vars": ["error", {
"argsIgnorePattern": "^_"
}],
"no-var": "warn",
"object-curly-newline" : ["warn", {
"consistent": true,
"multiline": true
}],
"object-curly-spacing" : "warn",
"prefer-const": "warn",
"prefer-regex-literals": "warn",
"quotes": ["warn", "double"],
"require-atomic-updates": "error",
"semi": "warn",
"semi-spacing": "warn",
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", "never"],
"space-in-parens": "warn"
"space-in-parens": "warn",
"yoda": "warn"
},
"globals": {
"console": "writable",
"svg": "writable",
"print": "readonly",
"HIDController": "writable",
"HIDDebug": "writable",
"HIDPacket": "writable",
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ jobs:
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-vsdevenv@v3

- name: "[macOS] install ccache and make"
if: runner.os == 'macOS'
run: |
brew install ccache ninja
- name: "[macOS/Windows] Get build environment name"
if: runner.os != 'Linux'
id: buildenv_name
Expand Down
46 changes: 32 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,33 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()

# Check if any relevant env vars were set from the build env scripts
if(DEFINED ENV{VCPKG_ROOT})
if(DEFINED ENV{X_VCPKG_APPLOCAL_DEPS_INSTALL} AND NOT DEFINED X_VCPKG_APPLOCAL_DEPS_INSTALL)
set(X_VCPKG_APPLOCAL_DEPS_INSTALL "$ENV{X_VCPKG_APPLOCAL_DEPS_INSTALL}" CACHE BOOL "")
# Set up vcpkg
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED VCPKG_ROOT)
set(VCPKG_ROOT "$ENV{VCPKG_ROOT}")
endif()

if(DEFINED VCPKG_ROOT)
set(X_VCPKG_APPLOCAL_DEPS_INSTALL TRUE)

if(NOT DEFINED VCPKG_OVERLAY_PORTS)
set(VCPKG_OVERLAY_PORTS "${VCPKG_ROOT}/overlay/ports")
if(APPLE)
list(APPEND VCPKG_OVERLAY_PORTS "${VCPKG_ROOT}/overlay/osx")
elseif(WIN32)
list(APPEND VCPKG_OVERLAY_PORTS "${VCPKG_ROOT}/overlay/windows")
endif()
endif()

if(DEFINED ENV{VCPKG_OVERLAY_TRIPLETS} AND NOT DEFINED VCPKG_OVERLAY_TRIPLETS)
set(VCPKG_OVERLAY_TRIPLETS "$ENV{VCPKG_OVERLAY_TRIPLETS}" CACHE STRING "")
if(NOT DEFINED VCPKG_OVERLAY_TRIPLETS)
set(VCPKG_OVERLAY_TRIPLETS "${VCPKG_ROOT}/overlay/triplets")
endif()

if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET})
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}")
endif()

if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()
endif()

Expand All @@ -64,6 +75,13 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
endif()
endif()

if(APPLE)
# Minimum macOS version supported by Qt 5.12
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "Minimum macOS version the build will be able to run on" FORCE)
# Needed for deployment target < 10.14
add_compile_options(-fno-aligned-allocation)
endif()

project(mixxx VERSION 2.4.0)
# Work around missing version suffixes support https://gitlab.kitware.com/cmake/cmake/-/issues/16716
set(MIXXX_VERSION_PRERELEASE "alpha-pre") # set to "alpha-pre" "beta" or ""
Expand Down Expand Up @@ -101,10 +119,6 @@ else()
set(LLVM_CLANG false)
endif()

if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14)
add_compile_options(-fno-aligned-allocation)
endif()

# CMake implicitly sets the variable MSVC to true for Microsoft
# Visual C++ or another compiler simulating Visual C++.
# https://cmake.org/cmake/help/latest/variable/MSVC.html
Expand Down Expand Up @@ -370,6 +384,10 @@ elseif(GNU_GCC OR LLVM_CLANG)
endif()
endif()

set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)

if(WIN32)
# Add support for lib prefix on Windows
set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
Expand Down Expand Up @@ -2881,7 +2899,7 @@ if (NOT CPACK_DEBIAN_PACKAGE_RELEASE)
set(CPACK_DEBIAN_PACKAGE_RELEASE 1)
endif()

set(CPACK_DEBIAN_DISTRIBUTION_RELEASES focal groovy hirsute impish)
set(CPACK_DEBIAN_DISTRIBUTION_RELEASES focal hirsute impish)
set(CPACK_DEBIAN_SOURCE_DIR ${CMAKE_SOURCE_DIR})
set(CPACK_DEBIAN_UPLOAD_PPA_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackDebUploadPPA.cmake")
set(CPACK_DEBIAN_INSTALL_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/packaging/CPackDebInstall.cmake")
Expand Down
57 changes: 57 additions & 0 deletions cmake/modules/FindJACK.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#[=======================================================================[.rst:
FindJACK
--------
Finds the JACK Audio Connection Kit library.
Imported Targets
^^^^^^^^^^^^^^^^
This module provides the following imported targets, if found:
``JACK::jack``
The JACK library
#]=======================================================================]

# Prefer finding the libraries from pkgconfig rather than find_library. This is
# required to build with PipeWire's reimplementation of the JACK library.
#
# This also enables using PortAudio with the jack2 port in vcpkg. That only
# builds JackWeakAPI (not the JACK server) which dynamically loads the real
# JACK library and forwards API calls to it. JackWeakAPI requires linking `dl`
# in addition to jack, as specified in the pkgconfig file in vcpkg.
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(JACK jack)
else()
find_library(JACK_LINK_LIBRARIES
NAMES jack
DOC "JACK library"
)
find_path(JACK_INCLUDEDIR
NAMES jack/jack.h
DOC "JACK header"
)
endif()

if(WIN32)
# vcpkg provides CMake targets for pthreads4w
# This won't work if pthreads4w was built without vcpkg.
find_package(pthreads REQUIRED)
list(APPEND JACK_LINK_LIBRARIES PThreads4W::PThreads4W)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
JACK
DEFAULT_MSG
JACK_LINK_LIBRARIES
JACK_INCLUDEDIR
)

if(JACK_FOUND AND NOT TARGET JACK::jack)
add_library(JACK::jack INTERFACE IMPORTED)
target_link_libraries(JACK::jack INTERFACE "${JACK_LINK_LIBRARIES}")
target_include_directories(JACK::jack INTERFACE "${JACK_INCLUDEDIR}")
endif()
9 changes: 9 additions & 0 deletions cmake/modules/FindPortAudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ if(PortAudio_FOUND)
INTERFACE_COMPILE_OPTIONS "${PC_PortAudio_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${PortAudio_INCLUDE_DIR}"
)
is_static_library(PortAudio_IS_STATIC PortAudio::PortAudio)
if(PortAudio_IS_STATIC)
find_package(JACK)
if(JACK_FOUND)
set_property(TARGET PortAudio::PortAudio APPEND PROPERTY INTERFACE_LINK_LIBRARIES
JACK::jack
)
endif()
endif()
if(PortAudio_ALSA_H)
target_compile_definitions(PortAudio::PortAudio INTERFACE PA_USE_ALSA)
endif()
Expand Down
6 changes: 3 additions & 3 deletions cmake/modules/Findhidapi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The following cache variables may also be set:

find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(PC_hidapi QUIET hidapi-libusb)
pkg_search_module(PC_hidapi QUIET hidapi-libusb hidapi)
endif()

find_path(hidapi_INCLUDE_DIR
Expand All @@ -72,7 +72,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
endif()

# Version detection
if(DEFINED PC_hidapi_VERSION)
if(PC_hidapi_VERSION)
set(hidapi_VERSION "${PC_hidapi_VERSION}")
else()
if (EXISTS "${hidapi_INCLUDE_DIR}/hidapi.h")
Expand All @@ -96,7 +96,7 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
hidapi
REQUIRED_VARS hidapi_LIBRARY hidapi_INCLUDE_DIR
REQUIRED_VARS hidapi_LIBRARY hidapi_INCLUDE_DIR hidapi_VERSION
VERSION_VAR hidapi_VERSION
)

Expand Down
9 changes: 7 additions & 2 deletions cmake/modules/IsStaticLibrary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
IsStaticLibrary
-------------
Macros to set a given variable to true or false whether the library is static
Macros to set a given variable to true or false whether the library is static.
This does not work on windows, because on windows we link always to a static
lib that loads either the dependent dlls as import library or contains the
functions itself. In this case this module returns FALSE.
Usage:
Expand All @@ -24,7 +28,8 @@ macro(IS_STATIC_LIBRARY var target)
get_target_property(_target_type ${target} TYPE)
if(${_target_type} STREQUAL "STATIC_LIBRARY")
set(${var} TRUE)
elseif(${_target_type} STREQUAL "UNKNOWN_LIBRARY")
elseif(${_target_type} STREQUAL "UNKNOWN_LIBRARY" AND NOT WIN32)
# Guess from file name. Does not work on windows, see https://gitlab.kitware.com/cmake/cmake/-/issues/17338.
get_target_property(_target_location ${target} LOCATION)
get_filename_component(_target_extension ${_target_location} EXT)
if(${_target_extension} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
Expand Down
8 changes: 5 additions & 3 deletions packaging/CPackDebUploadPPA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ if(NOT CPACK_DEBIAN_GPG_RET EQUAL "0")
endif()

# hack to advance the version from the legacy version like this:
# dpkg --compare-versions 2.4.0~alpha~pre1~git7859 lt 2.4.0~alpha1~5463~gf2da9e619d && echo true
# dpkg --compare-versions 2.4.0~alpha1~5463~gf2da9e619d lt 2.4.0 && echo true
# dpkg --compare-versions 2.4.0~alpha~pre1~git7859 lt 2.4.0~alpha2~5463~gf2da9e619d && echo true
# and from changing to --first-parent
# dpkg --compare-versions 2.4.0~alpha1~6372~g0244af2e04-1~impish lt 2.4.0~alpha2~805~g4f13bc1d5d-1~impish && echo true
# dpkg --compare-versions 2.4.0~alpha2~5463~gf2da9e619d lt 2.4.0 && echo true
if(DEB_UPLOAD_PPA MATCHES "nightlies")
string(REPLACE "2.4~alpha~" "2.4.0~alpha1~" CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_DEBIAN_PACKAGE_VERSION}")
string(REPLACE "2.4~alpha~" "2.4.0~alpha2~" CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_DEBIAN_PACKAGE_VERSION}")
endif()

message(NOTICE "Creating mixxx_${CPACK_DEBIAN_PACKAGE_VERSION}.orig.tar.gz")
Expand Down
4 changes: 2 additions & 2 deletions packaging/macos/build_environment
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
2.3-j00026-0b1209e3-osx10.12-x86_64-release
1b9ed64629fbf9bc6cf466840943588029594a649b0674ee347513f4bc677b8b
mixxx-deps-2.4-x64-osx-b124ddc
dd63757c35f861770413cc7537343d4dc930348d8074e6485458111f834c80de
2 changes: 1 addition & 1 deletion packaging/windows/build_environment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mixxx-deps-2.3-x64-windows-049b5ad
mixxx-deps-2.4-x64-windows-b124ddc
2 changes: 1 addition & 1 deletion res/controllers/Behringer-DDM4000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ var DDM4000 = new behringer.extension.GenericMidiController({
{ // Crossfader: On
type: CrossfaderUnit,
options: {
button: {midi: [note, 0x1F], sendShifted: true},
button: {group: "[Skin]", midi: [note, 0x1F], sendShifted: true},
crossfader: {midi: [cc, 0x15]}
},
},
Expand Down
Loading

0 comments on commit d0f45fc

Please sign in to comment.