From 23c87d16811774decf57af76848affdb93175ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 16 Dec 2021 22:25:34 +0100 Subject: [PATCH 1/3] Devendor FindSQLite3.cmake It is part of CMake since 3.13 and defines SQLite::SQLite3, without 3 --- CMakeLists.txt | 6 +-- cmake/modules/FindSQLite3.cmake | 87 --------------------------------- 2 files changed, 3 insertions(+), 90 deletions(-) delete mode 100644 cmake/modules/FindSQLite3.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index ffde008c025..3e9d91528ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1855,7 +1855,7 @@ find_package(SQLite3) if(NOT SQLite3_FOUND) set(LOCALECOMPARE_DEFAULT OFF) else() - is_static_library(SQLite3_IS_STATIC SQLite3::SQLite3) + is_static_library(SQLite3_IS_STATIC SQLite::SQLite3) if(SQLite3_IS_STATIC OR NOT APPLE) set(LOCALECOMPARE_DEFAULT ON) else() @@ -1868,10 +1868,10 @@ if(LOCALECOMPARE) message(FATAL_ERROR "Locale Aware Compare for SQLite requires libsqlite and its development headers.") endif() target_compile_definitions(mixxx-lib PUBLIC __SQLITE3__) - target_link_libraries(mixxx-lib PRIVATE SQLite3::SQLite3) + target_link_libraries(mixxx-lib PRIVATE SQLite::SQLite3) elseif(SQLite3_IS_STATIC) # in the static case we need to link SQLite3 uncoditionally - target_link_libraries(mixxx-lib PRIVATE SQLite3::SQLite3) + target_link_libraries(mixxx-lib PRIVATE SQLite::SQLite3) endif() # Denon Engine Prime library export support (using libdjinterop) diff --git a/cmake/modules/FindSQLite3.cmake b/cmake/modules/FindSQLite3.cmake deleted file mode 100644 index 5bee60d6c69..00000000000 --- a/cmake/modules/FindSQLite3.cmake +++ /dev/null @@ -1,87 +0,0 @@ -# This file is part of Mixxx, Digital DJ'ing software. -# Copyright (C) 2001-2022 Mixxx Development Team -# Distributed under the GNU General Public Licence (GPL) version 2 or any later -# later version. See the LICENSE file for details. - -#[=======================================================================[.rst: -FindSQLite3 ------------ - -Finds the SQLite3 library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``SQLite3::SQLite3`` - The SQLite3 library - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``SQLite3_FOUND`` - True if the system has the SQLite3 library. -``SQLite3_INCLUDE_DIRS`` - Include directories needed to use SQLite3. -``SQLite3_LIBRARIES`` - Libraries needed to link to SQLite3. -``SQLite3_DEFINITIONS`` - Compile definitions needed to use SQLite3. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``SQLite3_INCLUDE_DIR`` - The directory containing ``sqlite3.h``. -``SQLite3_LIBRARY`` - The path to the SQLite3 library. - -#]=======================================================================] - -find_package(PkgConfig QUIET) -if(PkgConfig_FOUND) - pkg_check_modules(PC_SQLite3 QUIET sqlite3) -endif() - -find_path(SQLite3_INCLUDE_DIR - NAMES sqlite3.h - PATHS ${PC_SQLite3_INCLUDE_DIRS} - PATH_SUFFIXES sqlite sqlite3 - DOC "SQLite3 include directory") -mark_as_advanced(SQLite3_INCLUDE_DIR) - -find_library(SQLite3_LIBRARY - NAMES sqlite3 - PATHS ${PC_SQLite3_LIBRARY_DIRS} - DOC "SQLite3 library" -) -mark_as_advanced(SQLite3_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - SQLite3 - DEFAULT_MSG - SQLite3_LIBRARY - SQLite3_INCLUDE_DIR -) - -if(SQLite3_FOUND) - set(SQLite3_LIBRARIES "${SQLite3_LIBRARY}") - set(SQLite3_INCLUDE_DIRS "${SQLite3_INCLUDE_DIR}") - set(SQLite3_DEFINITIONS ${PC_SQLite3_CFLAGS_OTHER}) - - if(NOT TARGET SQLite3::SQLite3) - add_library(SQLite3::SQLite3 UNKNOWN IMPORTED) - set_target_properties(SQLite3::SQLite3 - PROPERTIES - IMPORTED_LOCATION "${SQLite3_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${PC_SQLite3_CFLAGS_OTHER}" - INTERFACE_INCLUDE_DIRECTORIES "${SQLite3_INCLUDE_DIR}" - ) - endif() -endif() From fbabbbc945843d06fb9780d026fc3ce63a16377f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 16 Dec 2021 23:40:15 +0100 Subject: [PATCH 2/3] Update to latest vcpkg build Also set VCPKG_TARGET_TRIPLET and VCPKG_DEFAULT_HOST_TRIPLET to x64-osx-min10.12 this is required for the new environment and also prevents to go to crosscompile mode --- .github/workflows/build.yml | 2 ++ packaging/macos/build_environment | 4 ++-- packaging/windows/build_environment | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ae8d2a945c..cf51553c054 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,8 @@ jobs: -DMACOS_BUNDLE=ON -DMODPLUG=OFF -DWAVPACK=OFF + -DVCPKG_TARGET_TRIPLET=x64-osx-min10.12 + -DVCPKG_DEFAULT_HOST_TRIPLET=x64-osx-min10.12 # TODO: Fix this broken test on macOS ctest_args: --exclude-regex DirectoryDAOTest.relocateDirectory cpack_generator: DragNDrop diff --git a/packaging/macos/build_environment b/packaging/macos/build_environment index 0abbc386f60..8c317ad478c 100644 --- a/packaging/macos/build_environment +++ b/packaging/macos/build_environment @@ -1,2 +1,2 @@ -mixxx-deps-2.4-x64-osx-058063e -4ebfc80e20031bfe52589416a8465a07ef09ef8546a8d41b43c57e2c764a7545 +mixxx-deps-2.4-x64-osx-min10.12-3ede1a3 +afe8113d2ef6b8695610ba51bf7296b31a623f410ab8ee377173ea2214b5cca1 diff --git a/packaging/windows/build_environment b/packaging/windows/build_environment index 8afcbecc26e..a31cbea7d37 100644 --- a/packaging/windows/build_environment +++ b/packaging/windows/build_environment @@ -1 +1 @@ -mixxx-deps-2.4-x64-windows-058063e +mixxx-deps-2.4-x64-windows-3ede1a3 From eb1adc409416c5ad785b8a44712795efb57a0540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 9 Jun 2022 21:22:26 +0200 Subject: [PATCH 3/3] Make X_VCPKG_APPLOCAL_DEPS_INSTALL a cache variable to follow vcpkg upstream changes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e9d91528ee..2a0dcd8f5a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED VCPKG_ROOT) endif() if(DEFINED VCPKG_ROOT) - set(X_VCPKG_APPLOCAL_DEPS_INSTALL TRUE) + set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON CACHE BOOL "Automatically copy dependencies into the install target directory for executables." FORCE) if(NOT DEFINED VCPKG_OVERLAY_PORTS) set(VCPKG_OVERLAY_PORTS "${VCPKG_ROOT}/overlay/ports")