Skip to content
Closed

Qt6 #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
vcpkg_bootstrap: .\bootstrap-vcpkg.bat
vcpkg_triplet: x64-windows
vcpkg_overlay_ports: overlay/windows;overlay/ports
vcpkg_packages_extras: libid3tag libmad qt5-winextras
vcpkg_packages_extras: libid3tag libmad
check_disk_space: Get-PSDrive
- os: macos-10.15
vcpkg_path: /Users/runner/mixxx-vcpkg
vcpkg_bootstrap: ./bootstrap-vcpkg.sh
vcpkg_triplet: x64-osx
vcpkg_overlay_ports: overlay/osx:overlay/ports
vcpkg_packages_extras: qt5-macextras
vcpkg_triplet: x64-osx-min10.14
vcpkg_overlay_ports: overlay/ports
vcpkg_cache: /Users/runner/.cache/vcpkg/archives
check_disk_space: df -h
env:
Expand Down Expand Up @@ -50,12 +49,11 @@ jobs:
portmidi
protobuf
pthreads
qt5-base
qt5-declarative
qt5-script
qt5-svg
qt5-translations
qtkeychain
qtbase
qtdeclarative
qtsvg
qttranslations
qtkeychain[qt6]
rubberband
soundtouch
taglib
Expand Down
63 changes: 63 additions & 0 deletions overlay/ports/qtkeychain/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO frankosterfeld/qtkeychain
REF v0.12.0
SHA512 ad8f7b3e8f59894a09892aeb78118f5ed93aa4593eece782c1879a4f3c37d9d63e8d40ad4b2e6a2e286e0da39f45cd4ed46181a1a05c078a59134114b2456a03
HEAD_REF master
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
qt5 QT5
qt6 QT6
)

# Force the user to explicitly specify whether they want to link Qt5 or Qt6 rather
# than setting a default because accidentally pulling in the wrong dependency could waste
# a lot of time building.
if(NOT QT5 AND NOT QT6)
message(FATAL_ERROR "Either qt5 or qt6 feature must be selected for qtkeychain.")
endif()

if(QT5 AND QT6)
message(FATAL_ERROR "qt5 and qt6 features cannot both be enabled for qtkeychain. Pick one or the other.")
endif()

list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=ON)
else()
list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=OFF)
endif()

if (CMAKE_HOST_WIN32)
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON)
else()
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF)
endif()

if(QT6)
list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_WITH_QT6:BOOL=ON)
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${QTKEYCHAIN_OPTIONS}
)
vcpkg_cmake_install()

vcpkg_copy_pdbs()

if (QT5)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Qt5Keychain)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Qt6Keychain)
endif()
# Remove unneeded dirs
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
30 changes: 30 additions & 0 deletions overlay/ports/qtkeychain/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "qtkeychain",
"version-string": "0.12.0",
"description": "qtkeychain - Platform-independent Qt API for storing passwords securely",
"homepage": "https://github.com/frankosterfeld/qtkeychain",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"qt5": {
"description": "Build qtkeychain with Qt5",
"dependencies": [
"qt5-tools"
]
},
"qt6": {
"description": "Build qtkeychain with Qt6",
"dependencies": [
"qttools"
]
}
}
}
19 changes: 19 additions & 0 deletions overlay/triplets/x64-osx-min10.14.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)

# Mixxx loads fdk-aac dynamically at runtime. This allows the user to replace
# the version of fdk-aac we ship which has the patent-encumbered HE-AAC
#removed with another build that supports HE-AAC.
if(${PORT} MATCHES "fdk-aac")
set(VCPKG_LIBRARY_LINKAGE dynamic)
else()
set(VCPKG_LIBRARY_LINKAGE static)
endif()

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

set(VCPKG_OSX_DEPLOYMENT_TARGET 10.14)
set(VCPKG_C_FLAGS -mmacosx-version-min=10.14)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=10.14)