diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-07-30 15:17:50 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-08-26 12:05:52 +0200 |
commit | 3b375d2769ebeb059dc9a601fdf30d051bb988aa (patch) | |
tree | bf8cff9a91328d23d5bfbd7d1aba4da6b5592658 /src/designer | |
parent | f2657421c926702604ed08d34d1b7a1449283e27 (diff) |
CMake: Regenerate load(qt_app) projects
These now use the new qt_internal_add_app function. Also the script
will output necessary code to set the icons and resource files for
each of the apps.
Task-number: QTBUG-85757
Change-Id: I1a336243fc53a7f329ca17e6c1e40818dabeae30
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/designer')
-rw-r--r-- | src/designer/src/designer/.prev_CMakeLists.txt | 158 | ||||
-rw-r--r-- | src/designer/src/designer/CMakeLists.txt | 57 |
2 files changed, 202 insertions, 13 deletions
diff --git a/src/designer/src/designer/.prev_CMakeLists.txt b/src/designer/src/designer/.prev_CMakeLists.txt new file mode 100644 index 000000000..c1933a92f --- /dev/null +++ b/src/designer/src/designer/.prev_CMakeLists.txt @@ -0,0 +1,158 @@ +# Generated from designer.pro. + +##################################################################### +## designer App: +##################################################################### + +qt_internal_add_app(designer + SOURCES + ../../../shared/fontpanel/fontpanel.cpp ../../../shared/fontpanel/fontpanel.h + ../../../shared/qttoolbardialog/qttoolbardialog.cpp ../../../shared/qttoolbardialog/qttoolbardialog.h ../../../shared/qttoolbardialog/qttoolbardialog.ui + appfontdialog.cpp appfontdialog.h + assistantclient.cpp assistantclient.h + designer_enums.h + main.cpp + mainwindow.cpp mainwindow.h + newform.cpp newform.h + preferencesdialog.cpp preferencesdialog.h preferencesdialog.ui + qdesigner.cpp qdesigner.h + qdesigner_actions.cpp qdesigner_actions.h + qdesigner_appearanceoptions.cpp qdesigner_appearanceoptions.h qdesigner_appearanceoptions.ui + qdesigner_formwindow.cpp qdesigner_formwindow.h + qdesigner_server.cpp qdesigner_server.h + qdesigner_settings.cpp qdesigner_settings.h + qdesigner_toolwindow.cpp qdesigner_toolwindow.h + qdesigner_workbench.cpp qdesigner_workbench.h + saveformastemplate.cpp saveformastemplate.h saveformastemplate.ui + versiondialog.cpp versiondialog.h + INCLUDE_DIRECTORIES + ../../../shared/fontpanel + ../../../shared/qttoolbardialog + ../lib/extension + ../lib/sdk + ../lib/shared + extra + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::DesignerComponentsPrivate + Qt::DesignerPrivate + Qt::Gui + Qt::Network + Qt::Widgets + Qt::Xml + ENABLE_AUTOGEN_TOOLS + uic + PRECOMPILED_HEADER + "qdesigner_pch.h" +) + +# Resources: +set(designer_resource_files + "images/designer.png" +) + +qt_add_resource(designer "designer" + PREFIX + "/qt-project.org/designer" + FILES + ${designer_resource_files} +) +set_source_files_properties("../../../shared/qttoolbardialog/images/back.png" + PROPERTIES QT_RESOURCE_ALIAS "images/back.png" +) +set_source_files_properties("../../../shared/qttoolbardialog/images/down.png" + PROPERTIES QT_RESOURCE_ALIAS "images/down.png" +) +set_source_files_properties("../../../shared/qttoolbardialog/images/forward.png" + PROPERTIES QT_RESOURCE_ALIAS "images/forward.png" +) +set_source_files_properties("../../../shared/qttoolbardialog/images/minus.png" + PROPERTIES QT_RESOURCE_ALIAS "images/minus.png" +) +set_source_files_properties("../../../shared/qttoolbardialog/images/plus.png" + PROPERTIES QT_RESOURCE_ALIAS "images/plus.png" +) +set_source_files_properties("../../../shared/qttoolbardialog/images/up.png" + PROPERTIES QT_RESOURCE_ALIAS "images/up.png" +) +set(qttoolbardialog_resource_files + "images/back.png" + "images/down.png" + "images/forward.png" + "images/minus.png" + "images/plus.png" + "images/up.png" +) + +qt_add_resource(designer "qttoolbardialog" + PREFIX + "/qt-project.org/qttoolbardialog" + BASE + "../../../shared/qttoolbardialog" + FILES + ${qttoolbardialog_resource_files} +) + +set_target_properties(designer PROPERTIES + QT_TARGET_DESCRIPTION "Qt Designer" +) + +## Scopes: +##################################################################### + +qt_extend_target(designer CONDITION TARGET Qt::PrintSupport + PUBLIC_LIBRARIES + Qt::PrintSupport +) + +qt_extend_target(designer CONDITION QT_CONFIG___contains___static + DEFINES + QT_DESIGNER_STATIC +) + +if(WIN32) + set_target_properties(designer PROPERTIES + QT_TARGET_RC_ICONS "${CMAKE_CURRENT_SOURCE_DIR}/designer.ico" + ) +endif() + +if(WIN32) + set_target_properties(designer PROPERTIES + QT_TARGET_VERSION "${PROJECT_VERSION}.0" + ) +endif() + +if(UNIX) + set_target_properties(designer PROPERTIES + QT_TARGET_VERSION "${PROJECT_VERSION}" + ) +endif() + +if(APPLE) + set_target_properties(designer PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info_mac.plist" + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_ICON_FILE "designer.icns" + OUTPUT_NAME "Designer" + ) + set_source_files_properties(designer.icns PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + target_sources(designer PRIVATE + designer.icns + ) +endif() + +#### Keys ignored in scope 6:.:.:designer.pro:APPLE: +# FILETYPES.files = "uifile.icns" +# FILETYPES.path = "Contents/Resources" +# QMAKE_BUNDLE_DATA = "FILETYPES" + +qt_extend_target(designer CONDITION UNIX AND NOT HAIKU AND NOT MACOS + PUBLIC_LIBRARIES + m +) +qt_add_docs(designer + doc/qtdesigner.qdocconf +) + diff --git a/src/designer/src/designer/CMakeLists.txt b/src/designer/src/designer/CMakeLists.txt index be0ea16f1..cc938f58d 100644 --- a/src/designer/src/designer/CMakeLists.txt +++ b/src/designer/src/designer/CMakeLists.txt @@ -1,11 +1,10 @@ # Generated from designer.pro. ##################################################################### -## designer Binary: +## designer App: ##################################################################### -qt_add_executable(designer - GUI +qt_internal_add_app(designer SOURCES ../../../shared/fontpanel/fontpanel.cpp ../../../shared/fontpanel/fontpanel.h ../../../shared/qttoolbardialog/qttoolbardialog.cpp ../../../shared/qttoolbardialog/qttoolbardialog.h ../../../shared/qttoolbardialog/qttoolbardialog.ui @@ -94,9 +93,9 @@ qt_add_resource(designer "qttoolbardialog" ${qttoolbardialog_resource_files} ) - -#### Keys ignored in scope 1:.:.:designer.pro:<TRUE>: -# QMAKE_TARGET_DESCRIPTION = "Qt" "Designer" +set_target_properties(designer PROPERTIES + QT_TARGET_DESCRIPTION "Qt Designer" +) ## Scopes: ##################################################################### @@ -111,19 +110,51 @@ qt_extend_target(designer CONDITION QT_CONFIG___contains___static QT_DESIGNER_STATIC ) -#### Keys ignored in scope 4:.:.:designer.pro:WIN32: -# RC_ICONS = "designer.ico" -# VERSION = "$${QT_VERSION}.0" +if(WIN32) + set_target_properties(designer PROPERTIES + QT_TARGET_RC_ICONS "${CMAKE_CURRENT_SOURCE_DIR}/designer.ico" + ) +endif() + +if(WIN32) + set_target_properties(designer PROPERTIES + QT_TARGET_VERSION "${PROJECT_VERSION}.0" + ) +endif() + +if(UNIX) + set_target_properties(designer PROPERTIES + QT_TARGET_VERSION "${PROJECT_VERSION}" + ) +endif() -#### Keys ignored in scope 5:.:.:designer.pro:else: -# VERSION = "$${QT_VERSION}" +if(APPLE) + set_target_properties(designer PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info_mac.plist" + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_ICON_FILE "designer.icns" + OUTPUT_NAME "Designer" + ) + set_source_files_properties(designer.icns PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) + target_sources(designer PRIVATE + designer.icns + ) + # special case end + # Set values to be replaced in the custom Info_mac.plist. + # Also package the uifile.icns. + set(ICON "designer.icns") + set(EXECUTABLE "Designer") + set_source_files_properties(uifile.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + target_sources(designer PRIVATE uifile.icns) + # special case end +endif() #### Keys ignored in scope 6:.:.:designer.pro:APPLE: # FILETYPES.files = "uifile.icns" # FILETYPES.path = "Contents/Resources" -# ICON = "designer.icns" # QMAKE_BUNDLE_DATA = "FILETYPES" -# QMAKE_INFO_PLIST = "Info_mac.plist" qt_extend_target(designer CONDITION UNIX AND NOT HAIKU AND NOT MACOS PUBLIC_LIBRARIES |