diff options
Diffstat (limited to 'ports/qttools')
| -rw-r--r-- | ports/qttools/fix_static_build.patch | 27 | ||||
| -rw-r--r-- | ports/qttools/portfile.cmake | 94 | ||||
| -rw-r--r-- | ports/qttools/vcpkg.json | 29 | ||||
| -rw-r--r-- | ports/qttools/windeployqt.debug.bat | 10 |
4 files changed, 160 insertions, 0 deletions
diff --git a/ports/qttools/fix_static_build.patch b/ports/qttools/fix_static_build.patch new file mode 100644 index 000000000..bc67faf5d --- /dev/null +++ b/ports/qttools/fix_static_build.patch @@ -0,0 +1,27 @@ +diff --git a/src/designer/src/components/lib/CMakeLists.txt b/src/designer/src/components/lib/CMakeLists.txt +index 53358741f..ce070bd6a 100644 +--- a/src/designer/src/components/lib/CMakeLists.txt ++++ b/src/designer/src/components/lib/CMakeLists.txt +@@ -878,7 +878,7 @@ qt_internal_add_resource(DesignerComponents "widgetbox" + ## Scopes:
+ #####################################################################
+
+-qt_internal_extend_target(DesignerComponents CONDITION static
++qt_internal_extend_target(DesignerComponents CONDITION NOT BUILD_SHARED_LIBS
+ DEFINES
+ QT_DESIGNER_STATIC
+ )
+diff --git a/src/designer/src/designer/CMakeLists.txt b/src/designer/src/designer/CMakeLists.txt +index f786f1dd6..8c635ff14 100644 +--- a/src/designer/src/designer/CMakeLists.txt ++++ b/src/designer/src/designer/CMakeLists.txt +@@ -103,8 +103,8 @@ qt_internal_extend_target(designer CONDITION TARGET Qt::PrintSupport + PUBLIC_LIBRARIES
+ Qt::PrintSupport
+ )
+
+-qt_internal_extend_target(designer CONDITION QT_CONFIG___contains___static
++qt_internal_extend_target(designer CONDITION NOT BUILD_SHARED_LIBS
+ DEFINES
+ QT_DESIGNER_STATIC
+ )
diff --git a/ports/qttools/portfile.cmake b/ports/qttools/portfile.cmake new file mode 100644 index 000000000..f65cf8ce1 --- /dev/null +++ b/ports/qttools/portfile.cmake @@ -0,0 +1,94 @@ +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES )#fix_static_build.patch) + +#TODO check features and setup: (means force features!) + +# -- The following OPTIONAL packages have not been found: + + # * Qt6AxContainer + # * Clang + # * WrapLibClang (required version >= 8) + +# Configure summary: + +# Qt Tools: + # Qt Assistant ........................... yes + # QDoc ................................... no + # Clang-based lupdate parser ............. no + # Qt Designer ............................ yes + # Qt Distance Field Generator ............ yes + # kmap2qmap .............................. yes + # Qt Linguist ............................ yes + # Mac Deployment Tool .................... no + # pixeltool .............................. yes + # qdbus .................................. yes + # qev .................................... yes + # Qt Attributions Scanner ................ yes + # qtdiag ................................. yes + # qtpaths ................................ yes + # qtplugininfo ........................... yes + # Windows deployment tool ................ yes + +# General features: +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "qdoc" -DCMAKE_DISABLE_FIND_PACKAGE_Clang + "qdoc" -DCMAKE_DISABLE_FIND_PACKAGE_WrapLibClang + ) + + set(TOOL_NAMES + assistant + designer + lconvert + linguist + lprodump + lrelease-pro + lrelease + lupdate-pro + lupdate + pixeltool + qcollectiongenerator + qdistancefieldgenerator + qhelpgenerator + qtattributionsscanner + qtdiag + qtdiag6 + qtpaths + qtplugininfo + qdbus + qdbusviewer + qdoc + ) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND TOOL_NAMES windeployqt) +elseif(VCPKG_TARGET_IS_OSX) + list(APPEND TOOL_NAMES macdeployqt) +endif() + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + TOOL_NAMES ${TOOL_NAMES} + CONFIGURE_OPTIONS ${FEATURE_OPTIONS} + -DCMAKE_DISABLE_FIND_PACKAGE_Qt6AxContainer=ON + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) + +if(VCPKG_TARGET_IS_OSX) + set(OSX_APP_FOLDERS Designer.app Linguist.app pixeltool.app qdbusviewer.app) + foreach(_appfolder IN LISTS OSX_APP_FOLDERS) + message(STATUS "Moving: ${_appfolder}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${_appfolder}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${_appfolder}/" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${_appfolder}/") + endforeach() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +set(configfile "${CURRENT_PACKAGES_DIR}/share/Qt6ToolsTools/Qt6ToolsToolsTargets-debug.cmake") +if(EXISTS "${configfile}" AND EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt6/bin/windeployqt.exe") + file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/windeployqt.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt6/bin") + file(READ "${configfile}" _contents) + string(REPLACE [[${_IMPORT_PREFIX}/tools/qt6/bin/windeployqt.exe]] [[${_IMPORT_PREFIX}/tools/qt6/bin/windeployqt.debug.bat]] _contents "${_contents}") + file(WRITE "${configfile}" "${_contents}") +endif() diff --git a/ports/qttools/vcpkg.json b/ports/qttools/vcpkg.json new file mode 100644 index 000000000..86d9efa48 --- /dev/null +++ b/ports/qttools/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "qttools", + "version-semver": "6.1.0", + "description": "Qt Tools", + "homepage": "https://www.qt.io/", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "network" + ] + }, + "qtdeclarative", + { + "name": "qttools", + "host": true, + "default-features": false + } + ], + "features": { + "qdoc": { + "description": "Build QDoc.", + "dependencies": [ + "llvm" + ] + } + } +} diff --git a/ports/qttools/windeployqt.debug.bat b/ports/qttools/windeployqt.debug.bat new file mode 100644 index 000000000..d004e23f1 --- /dev/null +++ b/ports/qttools/windeployqt.debug.bat @@ -0,0 +1,10 @@ +@echo off
+setlocal
+set mypath=%~dp0
+set mypath=%mypath:~0,-1%
+cd %mypath%\..\..\..\debug\bin
+set BAKCD=%CD%
+set PATH=%CD%;%PATH%
+"%mypath%\windeployqt.exe" --qmake "%mypath%\qmake.debug.bat" %*
+cd %BAKCD%
+endlocal
\ No newline at end of file |
