View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014760CMake(No Category)public2014-02-17 10:542016-06-10 14:31
ReporterMathieu Malaterre 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.9 
Target VersionFixed in Version 
Summary0014760: Specify output dir for QT4_WRAP_UI
DescriptionIt would be nice to have an option to specify an output dir for QT4_WRAP_UI. This way it would be easier to port QMake -> CMake application.

Eg. QMake input:

[...]
UI_DIR = UI/AutoGen
FORMS += UI/UI/BrowseData.ui
[...]

Here is a suggestion for enhancement:

Change current macro into:

macro (QT4_WRAP_UI outfiles )
  QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})

  foreach (it ${ui_files})
    get_filename_component(outfile ${it} NAME_WE)
    get_filename_component(infile ${it} ABSOLUTE)
    set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${QT4_WRAP_UI_DIR}/ui_${outfile}.h)
    add_custom_command(OUTPUT ${outfile}
      COMMAND ${QT_UIC_EXECUTABLE}
      ARGS ${ui_options} -o ${outfile} ${infile}
      MAIN_DEPENDENCY ${infile} VERBATIM)
    set(${outfiles} ${${outfiles}} ${outfile})
  endforeach ()

endmacro ()


Typical usage:

set(QT4_WRAP_UI_DIR UI/AutoGen )
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${QT4_WRAP_UI_DIR})
QT4_WRAP_UI(myproject_FORMS_HEADERS ${myproject_FORMS})
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0035129)
Brad King (manager)
2014-02-17 10:57

CMake 3.0 introduces an AUTOUIC feature to replace the need for qt4_wrap_ui. Will that be able to handle this?
(0035131)
Mathieu Malaterre (developer)
2014-02-17 11:00

Neat! I'll give it a try when cmake enters debian. thx
(0035133)
Stephen Kelly (developer)
2014-02-17 11:29

I don't think AUTOUIC changes anything regarding this in particular.

Regarding porting, you might find it easier to change your use of UI_DIR as a porting step.
(0042490)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-02-17 10:54 Mathieu Malaterre New Issue
2014-02-17 10:57 Brad King Note Added: 0035129
2014-02-17 11:00 Mathieu Malaterre Note Added: 0035131
2014-02-17 11:29 Stephen Kelly Note Added: 0035133
2016-06-10 14:29 Kitware Robot Note Added: 0042490
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team