-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qwt|vcpkg-qmake] Update and switch to Qt6 (#22012)
- Loading branch information
Showing
18 changed files
with
511 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# vcpkg_qmake_build | ||
|
||
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-qmake/vcpkg_qmake_build.md). | ||
|
||
Build a qmake-based project, previously configured using vcpkg_qmake_configure. | ||
|
||
```cmake | ||
vcpkg_qmake_configure( | ||
[SKIP_MAKEFILES] | ||
[BUILD_LOGNAME arg1] | ||
[TARGETS arg1 [arg2 ...]] | ||
[RELEASE_TARGETS arg1 [arg2 ...]] | ||
[DEBUG_TARGETS arg1 [arg2 ...]] | ||
) | ||
``` | ||
|
||
### SKIP_MAKEFILES | ||
Skip the generation of makefiles | ||
|
||
### BUILD_LOGNAME | ||
Configuration independent prefix for the build log files (default:'build') | ||
|
||
### TARGETS, RELEASE\_TARGETS, DEBUG\_TARGETS | ||
Targets to build for a certain configuration. | ||
|
||
## Source | ||
[ports/vcpkg-qmake/vcpkg\_qmake\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-qmake/vcpkg_qmake_build.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# vcpkg_qmake_install | ||
|
||
The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-qmake/vcpkg_qmake_install.md). | ||
|
||
Build and install a qmake project. | ||
|
||
|
||
```cmake | ||
vcpkg_qmake_install(...) | ||
``` | ||
|
||
### Parameters: | ||
See [`vcpkg_qmake_build()`](vcpkg_qmake_build.md). | ||
|
||
### Notes: | ||
This command transparently forwards to [`vcpkg_qmake_build()`](vcpkg_qmake_build.md) | ||
and appends the 'install' target | ||
|
||
## Source | ||
[ports/vcpkg-qmake/vcpkg\_qmake\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-qmake/vcpkg_qmake_install.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
diff --git a/designer/designer.pro b/designer/designer.pro | ||
index fa4d8c7fd..ce3f82081 100644 | ||
--- a/designer/designer.pro | ||
+++ b/designer/designer.pro | ||
@@ -23,8 +23,8 @@ CONFIG( debug_and_release ) { | ||
|
||
message("debug_and_release: building the Qwt designer plugin in release mode only") | ||
|
||
- CONFIG -= debug_and_release | ||
- CONFIG += release | ||
+ # CONFIG -= debug_and_release | ||
+ # CONFIG += release | ||
} | ||
|
||
contains(QWT_CONFIG, QwtDesigner ) { | ||
diff --git a/qwtbuild.pri b/qwtbuild.pri | ||
index 9306b6ed0..5b51218b6 100644 | ||
--- a/qwtbuild.pri | ||
+++ b/qwtbuild.pri | ||
@@ -54,12 +54,12 @@ win32 { | ||
# might need a debug version. | ||
# Enable debug_and_release + build_all if you want to build both. | ||
|
||
- CONFIG += debug_and_release | ||
- CONFIG += build_all | ||
+ # CONFIG += debug_and_release | ||
+ # CONFIG += build_all | ||
} | ||
else { | ||
|
||
- CONFIG += release | ||
+ # CONFIG += release | ||
|
||
VER_MAJ = $${QWT_VER_MAJ} | ||
VER_MIN = $${QWT_VER_MIN} | ||
diff --git a/qwtconfig.pri b/qwtconfig.pri | ||
index 7da1485a0..b69b5ca71 100644 | ||
--- a/qwtconfig.pri | ||
+++ b/qwtconfig.pri | ||
@@ -19,18 +19,19 @@ QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT} | ||
QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX] | ||
|
||
unix { | ||
- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-dev | ||
+ # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-dev | ||
# QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-dev-qt-$$QT_VERSION | ||
} | ||
|
||
win32 { | ||
- QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-dev | ||
+ # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-dev | ||
# QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-dev-qt-$$QT_VERSION | ||
} | ||
|
||
-QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc | ||
+QWT_INSTALL_DOCS = $$[QT_INSTALL_DOCS]/doc | ||
-QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include | ||
+QWT_INSTALL_HEADERS = $${QWT_INSTALL_PREFIX}/include/qwt | ||
-QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib | ||
+QWT_INSTALL_LIBS = $$[QT_INSTALL_LIBS] | ||
+QWT_INSTALL_BINS = $$[QT_INSTALL_BINS] | ||
|
||
###################################################################### | ||
# Designer plugin | ||
@@ -42,7 +43,7 @@ QWT_INSTALL_LIBS = $${QWT_INSTALL_PREFIX}/lib | ||
# runtime environment of designer/creator. | ||
###################################################################### | ||
|
||
-QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer | ||
+QWT_INSTALL_PLUGINS = $$[QT_INSTALL_PLUGINS]/designer | ||
|
||
# linux distributors often organize the Qt installation | ||
# their way and QT_INSTALL_PREFIX doesn't offer a good | ||
@@ -63,7 +64,7 @@ QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer | ||
# with every Qt upgrade. | ||
###################################################################### | ||
|
||
-QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features | ||
+QWT_INSTALL_FEATURES = $$[QT_INSTALL_DATA]/mkspecs/features | ||
# QWT_INSTALL_FEATURES = $$[QT_INSTALL_PREFIX]/features | ||
|
||
###################################################################### | ||
@@ -72,7 +73,7 @@ QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features | ||
# it will be a static library. | ||
###################################################################### | ||
|
||
-QWT_CONFIG += QwtDll | ||
+# QWT_CONFIG += QwtDll | ||
|
||
###################################################################### | ||
# QwtPlot enables all classes, that are needed to use the QwtPlot | ||
@@ -114,7 +115,7 @@ QWT_CONFIG += QwtOpenGL | ||
# Otherwise you have to build it from the designer directory. | ||
###################################################################### | ||
|
||
-QWT_CONFIG += QwtDesigner | ||
+# QWT_CONFIG += QwtDesigner | ||
|
||
###################################################################### | ||
# Compile all Qwt classes into the designer plugin instead | ||
@@ -137,7 +138,7 @@ win32 { | ||
# Otherwise you have to build them from the examples directory. | ||
###################################################################### | ||
|
||
-QWT_CONFIG += QwtExamples | ||
+# QWT_CONFIG += QwtExamples | ||
|
||
###################################################################### | ||
# The playground is primarily intended for the Qwt development | ||
@@ -148,14 +149,14 @@ QWT_CONFIG += QwtExamples | ||
# Otherwise you have to build them from the playground directory. | ||
###################################################################### | ||
|
||
-QWT_CONFIG += QwtPlayground | ||
+# QWT_CONFIG += QwtPlayground | ||
|
||
###################################################################### | ||
# If you want to auto build the tests, enable the line below | ||
# Otherwise you have to build them from the tests directory. | ||
###################################################################### | ||
|
||
-QWT_CONFIG += QwtTests | ||
+# QWT_CONFIG += QwtTests | ||
|
||
###################################################################### | ||
# When Qt has been built as framework qmake wants | ||
@@ -171,8 +172,4 @@ macx:!static:CONFIG(qt_framework, qt_framework|qt_no_framework) { | ||
# Create and install pc files for pkg-config | ||
# See http://www.freedesktop.org/wiki/Software/pkg-config/ | ||
###################################################################### | ||
- | ||
-unix { | ||
- | ||
- QWT_CONFIG += QwtPkgConfig | ||
-} | ||
+# QWT_CONFIG += QwtPkgConfig # Qt6 has no pkgconfig files | ||
diff --git a/src/src.pro b/src/src.pro | ||
index 762e4c49b..d70a1b62b 100644 | ||
--- a/src/src.pro | ||
+++ b/src/src.pro | ||
@@ -49,27 +50,27 @@ contains(QWT_CONFIG, QwtFramework) { | ||
include ( $${PWD}/src.pri ) | ||
|
||
# Install directives | ||
|
||
target.path = $${QWT_INSTALL_LIBS} | ||
INSTALLS = target | ||
|
||
CONFIG(lib_bundle) { | ||
|
||
FRAMEWORK_HEADERS.version = Versions | ||
FRAMEWORK_HEADERS.files = $${HEADERS} | ||
FRAMEWORK_HEADERS.path = Headers | ||
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS | ||
} | ||
else { | ||
|
||
headers.files = $${HEADERS} | ||
headers.path = $${QWT_INSTALL_HEADERS} | ||
INSTALLS += headers | ||
} | ||
|
||
contains(QWT_CONFIG, QwtPkgConfig) { | ||
|
||
- CONFIG += create_pc create_prl no_install_prl | ||
+ CONFIG += create_pc create_prl | ||
|
||
QMAKE_PKGCONFIG_NAME = Qwt$${QWT_VER_MAJ} | ||
QMAKE_PKGCONFIG_DESCRIPTION = Qt Widgets for Technical Applications | ||
@@ -82,14 +81,14 @@ contains(QWT_CONFIG, QwtPkgConfig) { | ||
greaterThan(QT_MAJOR_VERSION, 4) { | ||
|
||
QMAKE_PKGCONFIG_FILE = Qt$${QT_MAJOR_VERSION}$${QMAKE_PKGCONFIG_NAME} | ||
- QMAKE_PKGCONFIG_REQUIRES = Qt5Widgets Qt5Concurrent Qt5PrintSupport | ||
+ QMAKE_PKGCONFIG_REQUIRES = Qt$${QT_MAJOR_VERSION}Widgets Qt$${QT_MAJOR_VERSION}Concurrent Qt$${QT_MAJOR_VERSION}PrintSupport | ||
|
||
contains(QWT_CONFIG, QwtSvg) { | ||
- QMAKE_PKGCONFIG_REQUIRES += Qt5Svg | ||
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}Svg | ||
} | ||
|
||
contains(QWT_CONFIG, QwtOpenGL) { | ||
- QMAKE_PKGCONFIG_REQUIRES += Qt5OpenGL | ||
+ QMAKE_PKGCONFIG_REQUIRES += Qt$${QT_MAJOR_VERSION}OpenGL | ||
} | ||
|
||
QMAKE_DISTCLEAN += $${DESTDIR}/$${QMAKE_PKGCONFIG_DESTDIR}/$${QMAKE_PKGCONFIG_FILE}.pc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/src/src.pro b/src/src.pro | ||
index 0ce903fe7..16524b8e2 100644 | ||
--- a/src/src.pro | ||
+++ b/src/src.pro | ||
@@ -20,6 +20,7 @@ TEMPLATE = lib | ||
TARGET = $$qwtLibraryTarget(qwt) | ||
|
||
DESTDIR = $${QWT_OUT_ROOT}/lib | ||
+DLLDESTDIR = $${QWT_OUT_ROOT}/bin | ||
|
||
contains(QWT_CONFIG, QwtDll) { | ||
|
||
@@ -49,9 +50,13 @@ contains(QWT_CONFIG, QwtFramework) { | ||
include ( $${PWD}/src.pri ) | ||
|
||
# Install directives | ||
- | ||
+win32 { | ||
+ dlltarget.path = $${QWT_INSTALL_BINS} | ||
+ INSTALLS += dlltarget | ||
+} | ||
target.path = $${QWT_INSTALL_LIBS} | ||
-INSTALLS = target | ||
+!static: target.CONFIG = no_dll | ||
+INSTALLS += target | ||
|
||
CONFIG(lib_bundle) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,32 @@ | ||
vcpkg_from_sourceforge( | ||
vcpkg_from_git( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO qwt/qwt | ||
REF 6.2.0 | ||
FILENAME "qwt-6.2.0.zip" | ||
SHA512 a3946c6e23481b5a2193819a1c1298db5a069d514ca60de54accb3a249403f5acd778172ae6fae24fae252767b1e58deba524de6225462f1bafd7c947996aae9 | ||
PATCHES | ||
fix-dynamic-static.patch | ||
URL "https://git.code.sf.net/p/qwt/git" | ||
REF "06d6822b595b70c9fd567a4fe0d835759bf271fe" | ||
FETCH_REF qwt-6.2 | ||
PATCHES | ||
config.patch | ||
fix_dll_install.patch | ||
) | ||
|
||
vcpkg_configure_qmake( | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" IS_DYNAMIC) | ||
set(OPTIONS "") | ||
if(IS_DYNAMIC) | ||
set(OPTIONS "QWT_CONFIG+=QwtDll") | ||
endif() | ||
vcpkg_qmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
CONFIG+=${VCPKG_LIBRARY_LINKAGE} | ||
QMAKE_OPTIONS | ||
${OPTIONS} | ||
"CONFIG-=debug_and_release" | ||
"CONFIG+=create_prl" | ||
"CONFIG+=link_prl" | ||
) | ||
|
||
if (VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_install_qmake( | ||
RELEASE_TARGETS sub-src-release_ordered | ||
DEBUG_TARGETS sub-src-debug_ordered | ||
) | ||
else () | ||
vcpkg_install_qmake( | ||
RELEASE_TARGETS sub-src-all-ordered | ||
DEBUG_TARGETS sub-src-all-ordered | ||
) | ||
endif() | ||
vcpkg_qmake_install() | ||
vcpkg_copy_pdbs() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") | ||
endif() | ||
|
||
#Install the header files | ||
file(GLOB HEADER_FILES "${SOURCE_PATH}/src/*.h" "${SOURCE_PATH}/classincludes/*") | ||
file(INSTALL ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}") | ||
|
||
# Handle copyright | ||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
{ | ||
"name": "qwt", | ||
"version-semver": "6.2.0", | ||
"port-version": 2, | ||
"version": "6.2.0+20220616", | ||
"description": "qt widgets library for technical applications", | ||
"homepage": "https://sourceforge.net/projects/qwt", | ||
"license": null, | ||
"dependencies": [ | ||
{ | ||
"name": "qt5-base", | ||
"default-features": false | ||
"name": "qtbase", | ||
"default-features": false, | ||
"features": [ | ||
"concurrent", | ||
"gui", | ||
"widgets" | ||
] | ||
}, | ||
"qt5-svg", | ||
"qt5-tools" | ||
"qtsvg", | ||
{ | ||
"name": "vcpkg-qmake", | ||
"host": true, | ||
"default-features": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.