|
|
|
@ -9,6 +9,7 @@ This method takes the following keyword arguments: |
|
|
|
|
- `moc_headers`, `moc_sources`, `ui_files`, `qresources`, which define the files that require preprocessing with `moc`, `uic` and `rcc` |
|
|
|
|
- `include_directories`, the directories to add to header search path for `moc` (optional) |
|
|
|
|
- `moc_extra_arguments`, any additional arguments to `moc` (optional). Available since v0.44.0. |
|
|
|
|
- `dependencies`, dependency objects needed by moc. Available since v0.48.0. |
|
|
|
|
|
|
|
|
|
It returns an opaque object that should be passed to a main build target. |
|
|
|
|
|
|
|
|
@ -39,7 +40,8 @@ qt5_dep = dependency('qt5', modules: ['Core', 'Gui']) |
|
|
|
|
inc = include_directories('includes') |
|
|
|
|
moc_files = qt5.preprocess(moc_headers : 'myclass.h', |
|
|
|
|
moc_extra_arguments: ['-DMAKES_MY_MOC_HEADER_COMPILE'], |
|
|
|
|
include_directories: inc) |
|
|
|
|
include_directories: inc, |
|
|
|
|
dependencies: qt5_dep) |
|
|
|
|
translations = qt5.compile_translations(ts_files : 'myTranslation_fr.ts', build_by_default : true) |
|
|
|
|
executable('myprog', 'main.cpp', 'myclass.cpp', moc_files, |
|
|
|
|
include_directories: inc, |
|
|
|
|