diff --git a/tools/assistant/CMakeLists.txt b/tools/assistant/CMakeLists.txt index 8ce054e2..860273f1 100644 --- a/tools/assistant/CMakeLists.txt +++ b/tools/assistant/CMakeLists.txt @@ -20,6 +20,13 @@ tde_auto_add_subdirectories() set( target tqassistant ) +file( + GLOB ${target}_IMAGES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png +) +list( SORT ${target}_IMAGES ) + tde_add_executable( ${target} SOURCES main.cpp @@ -39,8 +46,6 @@ tde_add_executable( ${target} settingsdialog.ui tabbedbrowser.ui - embed_image_collection.cpp - LINK tqt-mt-shared tqassistantclient-shared @@ -60,27 +65,7 @@ set_property( ) tqt_automoc( ${target} ) - - -##### embed images - -file( - GLOB ${target}_IMAGES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png -) -list( SORT ${target}_IMAGES ) -add_custom_command( OUTPUT embed_image_collection.cpp - COMMAND ${UIC_EXECUTABLE} -embed ${target} ${${target}_IMAGES} - -o ${CMAKE_CURRENT_BINARY_DIR}/embed_image_collection.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS tquic - COMMENT "Embed images for ${target}" -) -add_custom_target( ${target}-embed-images - COMMENT "Generate embed images for ${target}" - DEPENDS ${CURRENT_CMAKE_BINARY_DIR}/embed_image_collection.cpp -) +tqt_uic_embed( ${target} FILES ${${target}_IMAGES} ) ##### other data diff --git a/tools/designer/designer/CMakeLists.txt b/tools/designer/designer/CMakeLists.txt index 50f1f970..c9ac4d24 100644 --- a/tools/designer/designer/CMakeLists.txt +++ b/tools/designer/designer/CMakeLists.txt @@ -105,73 +105,6 @@ set( ${target}_SOURCES connectiondialog.ui variabledialog.ui configtoolboxdialog.ui - - embed_image_collection.cpp -) - -set( ${target}_INCLUDES - command.h - defs.h - formwindow.h - layout.h - mainwindow.h - metadatabase.h - pixmapchooser.h - propertyeditor.h - resource.h - sizehandle.h - orderindicator.h - widgetfactory.h - hierarchyview.h - listboxeditorimpl.h - newformimpl.h - workspace.h - listvieweditorimpl.h - customwidgeteditorimpl.h - paletteeditorimpl.h - styledbutton.h - iconvieweditorimpl.h - multilineeditorimpl.h - formsettingsimpl.h - asciivalidator.h - ../interfaces/widgetinterface.h - ../interfaces/actioninterface.h - ../interfaces/filterinterface.h - ../interfaces/designerinterface.h - designerapp.h - designerappiface.h - actioneditorimpl.h - actionlistview.h - actiondnd.h - project.h - projectsettingsimpl.h - sourceeditor.h - outputwindow.h - ../shared/widgetdatabase.h - ../shared/parser.h - previewframe.h - previewwidgetimpl.h - paletteeditoradvancedimpl.h - pixmapcollection.h - sourcefile.h - wizardeditorimpl.h - qcompletionedit.h - timestamp.h - formfile.h - widgetaction.h - propertyobject.h - startdialogimpl.h - syntaxhighlighter_html.h - connectionitems.h - editfunctionsimpl.h - variabledialogimpl.h - listviewdnd.h - listboxdnd.h - listdnd.h - listboxrename.h - connectiontable.h - popupmenueditor.h - menubareditor.h ) if( WITH_MODULE_SQL ) @@ -179,9 +112,6 @@ if( WITH_MODULE_SQL ) database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp dbconnections.ui dbconnection.ui dbconnectioneditor.ui ) - list( APPEND ${target}_INCLUDES - database.h dbconnectionimpl.h dbconnectionsimpl.h -) endif() if( WITH_MODULE_TABLE ) @@ -189,9 +119,15 @@ if( WITH_MODULE_TABLE ) tableeditorimpl.cpp tableeditor.ui ) - list( APPEND ${target}_INCLUDES tableeditorimpl.h ) endif() +file( + GLOB ${target}_IMAGES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png +) +list( SORT ${target}_IMAGES ) + tde_add_library( ${target} SHARED SOURCES ${${target}_SOURCES} LINK tqt-mt-shared tqassistantclient-shared tqui-shared @@ -209,29 +145,8 @@ set_property( QT_INTERNAL_TABLE ) -tqt_automoc( ${target}-shared INCLUDES ${${target}_INCLUDES} ) - - -##### embed images - -file( - GLOB ${target}_IMAGES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png -) -list( SORT ${target}_IMAGES ) -add_custom_command( OUTPUT embed_image_collection.cpp - COMMAND ${UIC_EXECUTABLE} - -embed ${target} ${${target}_IMAGES} - -o ${CMAKE_CURRENT_BINARY_DIR}/embed_image_collection.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS tquic - COMMENT "Embed images for ${target}" -) -add_custom_target( ${target}-embed-images - COMMENT "Generate embed images for ${target}" - DEPENDS ${CURRENT_CMAKE_BINARY_DIR}/embed_image_collection.cpp -) +tqt_automoc( ${target}-shared ) +tqt_uic_embed( ${target}-shared PROJECT ${target} FILES ${${target}_IMAGES} ) ##### other data diff --git a/tools/designer/uilib/CMakeLists.txt b/tools/designer/uilib/CMakeLists.txt index 715c8525..28a2ce52 100644 --- a/tools/designer/uilib/CMakeLists.txt +++ b/tools/designer/uilib/CMakeLists.txt @@ -27,11 +27,6 @@ set( ${target}_SOURCES ../shared/uib.cpp ) -set( ${target}_INCLUDES - ../shared/domtool.h - ../shared/uib.h -) - if( WITH_MODULE_SQL ) list( APPEND ${target}_SOURCES ../designer/database.cpp ) list( APPEND ${target}_INCLUDES ../designer/database2.h ) @@ -44,11 +39,12 @@ tde_add_library( ${target} SHARED DESTINATION ${LIB_INSTALL_DIR} ) +# NOTE don't AUTO automoc due to it includes wrong header for database.cpp +tqt_automoc(${target}-shared INCLUDES ${${target}_INCLUDES} ) + set_property( TARGET ${target}-shared APPEND PROPERTY COMPILE_DEFINITIONS QT_INTERNAL_XML RESOURCE ) - -tqt_automoc( ${target}-shared INCLUDES ${${target}_INCLUDES} ) diff --git a/tools/linguist/linguist/CMakeLists.txt b/tools/linguist/linguist/CMakeLists.txt index 80bd6a2a..9940f390 100644 --- a/tools/linguist/linguist/CMakeLists.txt +++ b/tools/linguist/linguist/CMakeLists.txt @@ -31,9 +31,14 @@ set( ${target}_SOURCES about.ui statistics.ui +) - embed_image_collection.cpp +file( + GLOB ${target}_IMAGES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png ) +list( SORT ${target}_IMAGES ) tde_add_executable( ${target} SOURCES ${${target}_SOURCES} @@ -49,28 +54,7 @@ set_property( ) tqt_automoc( ${target} ) - - -##### embed images - -file( - GLOB ${target}_IMAGES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png -) -list( SORT ${target}_IMAGES ) -add_custom_command( OUTPUT embed_image_collection.cpp - COMMAND ${UIC_EXECUTABLE} - -embed ${target} ${${target}_IMAGES} - -o ${CMAKE_CURRENT_BINARY_DIR}/embed_image_collection.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDS tquic - COMMENT "Embed images for ${target}" -) -add_custom_target( ${target}-embed-images - COMMENT "Generate embed images for ${target}" - DEPENDS ${CURRENT_CMAKE_BINARY_DIR}/embed_image_collection.cpp -) +tqt_uic_embed( ${target} FILES ${${target}_IMAGES} ) ##### other data