From d5dd0d7a48593c690fa8759349f0f6fda71faa49 Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 27 Oct 2020 09:00:20 +0100 Subject: [PATCH 1/4] Search for bundled libKeyFinder in lib/libKeyFinder --- CMakeLists.txt | 57 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06a76513c50..f1adbecbba8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1530,21 +1530,46 @@ if(KEYFINDER) find_package(FFTW REQUIRED) set(KeyFinder_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lib/keyfinder-install") set(KeyFinder_LIBRARY "lib/${CMAKE_STATIC_LIBRARY_PREFIX}keyfinder${CMAKE_STATIC_LIBRARY_SUFFIX}") - ExternalProject_Add(keyfinder - GIT_REPOSITORY https://github.com/ibsh/libKeyFinder.git - GIT_TAG v2.2.2 - GIT_SHALLOW TRUE - INSTALL_DIR "${KeyFinder_INSTALL_DIR}" - CMAKE_ARGS - -DBUILD_STATIC_LIBS=ON - -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH= - -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" - BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder - BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} - EXCLUDE_FROM_ALL TRUE - ) + find_path(KeyFinder_BUNDLED_SOURCE + NAMES keyfinder.h + PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib/libKeyFinder" + NO_DEFAULT_PATH + DOC "Bundled KeyFinder library directory") + mark_as_advanced(KeyFinder_BUNDLED_SOURCE) + if(EXISTS "${KeyFinder_BUNDLED_SOURCE}") + message(STATUS "Found KeyFinder bundled in ${KeyFinder_BUNDLED_SOURCE}") + ExternalProject_Add(libKeyFinder + SOURCE_DIR "${KeyFinder_BUNDLED_SOURCE}" + # Common settings (Bundled + Git repo) + INSTALL_DIR "${KeyFinder_INSTALL_DIR}" + CMAKE_ARGS + -DBUILD_STATIC_LIBS=ON + -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH= + -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder + BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} + EXCLUDE_FROM_ALL TRUE + ) + else() + ExternalProject_Add(libKeyFinder + GIT_REPOSITORY https://github.com/ibsh/libKeyFinder.git + GIT_TAG v2.2.2 + GIT_SHALLOW TRUE + # Common settings (Bundled + Git repo) + INSTALL_DIR "${KeyFinder_INSTALL_DIR}" + CMAKE_ARGS + -DBUILD_STATIC_LIBS=ON + -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH= + -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder + BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} + EXCLUDE_FROM_ALL TRUE + ) + endif() # This is a bit of a hack to make sure that the include directory actually # exists when configuring the build. @@ -1557,7 +1582,7 @@ if(KEYFINDER) file(MAKE_DIRECTORY "${KeyFinder_INSTALL_DIR}/include") add_library(mixxx-keyfinder STATIC IMPORTED) - add_dependencies(mixxx-keyfinder keyfinder) + add_dependencies(mixxx-keyfinder libKeyFinder) set_target_properties(mixxx-keyfinder PROPERTIES IMPORTED_LOCATION "${KeyFinder_INSTALL_DIR}/${KeyFinder_LIBRARY}") target_link_libraries(mixxx-keyfinder INTERFACE FFTW::FFTW) target_include_directories(mixxx-keyfinder INTERFACE "${KeyFinder_INSTALL_DIR}/include") From 90e61fcae49c142e2543c6d4581c7857b25b76aa Mon Sep 17 00:00:00 2001 From: Uwe Klotz Date: Tue, 27 Oct 2020 11:27:40 +0100 Subject: [PATCH 2/4] Add empty libKeyFinder directory as placeholder --- lib/libKeyFinder/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 lib/libKeyFinder/.gitkeep diff --git a/lib/libKeyFinder/.gitkeep b/lib/libKeyFinder/.gitkeep new file mode 100644 index 00000000000..07ac4f0f7ec --- /dev/null +++ b/lib/libKeyFinder/.gitkeep @@ -0,0 +1 @@ +Place the bundled libKeyFinder sources in this directory. From 9feb288e8de38fff45d51cf35d491fcfd5ef8702 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Tue, 27 Oct 2020 23:41:55 +0100 Subject: [PATCH 3/4] CMake: Do not duplicate externalproject --- CMakeLists.txt | 56 +++++++++++---------------------------- lib/libKeyFinder/.gitkeep | 1 - 2 files changed, 16 insertions(+), 41 deletions(-) delete mode 100644 lib/libKeyFinder/.gitkeep diff --git a/CMakeLists.txt b/CMakeLists.txt index f1adbecbba8..06cb261eaf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1530,46 +1530,22 @@ if(KEYFINDER) find_package(FFTW REQUIRED) set(KeyFinder_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lib/keyfinder-install") set(KeyFinder_LIBRARY "lib/${CMAKE_STATIC_LIBRARY_PREFIX}keyfinder${CMAKE_STATIC_LIBRARY_SUFFIX}") - find_path(KeyFinder_BUNDLED_SOURCE - NAMES keyfinder.h - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib/libKeyFinder" - NO_DEFAULT_PATH - DOC "Bundled KeyFinder library directory") - mark_as_advanced(KeyFinder_BUNDLED_SOURCE) - if(EXISTS "${KeyFinder_BUNDLED_SOURCE}") - message(STATUS "Found KeyFinder bundled in ${KeyFinder_BUNDLED_SOURCE}") - ExternalProject_Add(libKeyFinder - SOURCE_DIR "${KeyFinder_BUNDLED_SOURCE}" - # Common settings (Bundled + Git repo) - INSTALL_DIR "${KeyFinder_INSTALL_DIR}" - CMAKE_ARGS - -DBUILD_STATIC_LIBS=ON - -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH= - -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" - BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder - BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} - EXCLUDE_FROM_ALL TRUE - ) - else() - ExternalProject_Add(libKeyFinder - GIT_REPOSITORY https://github.com/ibsh/libKeyFinder.git - GIT_TAG v2.2.2 - GIT_SHALLOW TRUE - # Common settings (Bundled + Git repo) - INSTALL_DIR "${KeyFinder_INSTALL_DIR}" - CMAKE_ARGS - -DBUILD_STATIC_LIBS=ON - -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX:PATH= - -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" - BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder - BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} - EXCLUDE_FROM_ALL TRUE - ) - endif() + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/download") + ExternalProject_Add(libKeyFinder + URL "https://github.com/ibsh/libKeyFinder/archive/v2.2.2.zip" + URL_HASH SHA256=f04ff63c9710d969e79b71bde18abd720e886f537951a1045cc50cb497a72492 + DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/download/libKeyFinder" + INSTALL_DIR "${KeyFinder_INSTALL_DIR}" + CMAKE_ARGS + -DBUILD_STATIC_LIBS=ON + -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX:PATH= + -DCMAKE_PREFIX_PATH:PATH="${CMAKE_PREFIX_PATH}" + BUILD_COMMAND ${CMAKE_COMMAND} --build . --target keyfinder + BUILD_BYPRODUCTS /${KeyFinder_LIBRARY} + EXCLUDE_FROM_ALL TRUE + ) # This is a bit of a hack to make sure that the include directory actually # exists when configuring the build. diff --git a/lib/libKeyFinder/.gitkeep b/lib/libKeyFinder/.gitkeep deleted file mode 100644 index 07ac4f0f7ec..00000000000 --- a/lib/libKeyFinder/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -Place the bundled libKeyFinder sources in this directory. From face6c873714be4ba638b09fd14632a2993f8198 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Thu, 29 Oct 2020 16:48:07 +0100 Subject: [PATCH 4/4] changelog: fix library focus crash #3201 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 93fc56e0b27..21dae471d8e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ * Prevent moving a loop beyond track end #3117 lp:1799574 * Use 6 instead of only 4 compatible musical keys (major/minor) #3205 * Fix possible memory corruption using JACK on Linux +* Fix possible crash when trying to refocus the tracks table while another Mixxx window has focus #3201 ==== 2.2.4 2020-05-10 ====