Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kddockwidgets] new port #21989

Merged
merged 9 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
15 changes: 15 additions & 0 deletions ports/kddockwidgets/fix_find_package.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c174b89a..b83bace53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,8 +127,8 @@ endif()
if(${PROJECT_NAME}_QT6)
set(Qt_VERSION_MAJOR 6)
set(QT_MIN_VERSION "6.0.0")
- find_package(Qt6Widgets ${QT_MIN_VERSION} REQUIRED)
- find_package(Qt6Test ${QT_MIN_VERSION} REQUIRED)
+ find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Widgets REQUIRED)
+ find_package(Qt6 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Test)
set(${PROJECT_NAME}_LIBRARY_QTID "-qt6")
else()
set(Qt_VERSION_MAJOR 5)
43 changes: 43 additions & 0 deletions ports/kddockwidgets/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KDAB/KDDockWidgets
REF 9990300006854afa4b4fa796912da067e770046a
SHA512 2207b3c021957d9be8652cad24c0b5e37b07fa02ffeeeb7dab57feaeade7973b580b853d6b69db15015b62cc1397459e27d032131292baaeb17a0633e287fa3c
HEAD_REF master
PATCHES
fix_find_package.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KD_STATIC)

if(VCPKG_CROSSCOMPILING)
list(APPEND _qarg_OPTIONS -DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR})
list(APPEND _qarg_OPTIONS -DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 AND VCPKG_TARGET_IS_WINDOWS) # Remove if PR #16111 is merged
list(APPEND _qarg_OPTIONS -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR:STRING=ARM64 -DCMAKE_SYSTEM_NAME:STRING=Windows)
endif()
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
PREFER_NINJA
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
OPTIONS
${_qarg_OPTIONS}
-DKDDockWidgets_QT6=ON
-DKDDockWidgets_STATIC=${KD_STATIC}
-DKDDockWidgets_QTQUICK=OFF
-DKDDockWidgets_PYTHON_BINDINGS=OFF
-DKDDockWidgets_EXAMPLES=OFF
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/KDDockWidgets-qt6" PACKAGE_NAME "KDDockWidgets-qt6")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
23 changes: 23 additions & 0 deletions ports/kddockwidgets/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "kddockwidgets",
"version": "1.5.0",
"description": "KDAB's Dock Widget Framework for Qt",
"homepage": "https://www.kdab.com/development-resources/qt-tools/kddockwidgets/",
"dependencies": [
{
"name": "qtbase",
"default-features": false,
"features": [
"widgets"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3024,6 +3024,10 @@
"baseline": "1.0.0",
"port-version": 0
},
"kddockwidgets": {
"baseline": "1.5.0",
"port-version": 0
},
"kealib": {
"baseline": "1.4.14",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/k-/kddockwidgets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f21edcbac4ade0c396531cb8be57604297437b7c",
"version": "1.5.0",
"port-version": 0
}
]
}