summaryrefslogtreecommitdiff
path: root/config/qt5_core.mpb
blob: 7e7306af879f98d879e5dfc54fed26a35f589579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
project {
  expand(QT5_INCDIR) {
    $QT5_INCDIR
    $(QTDIR)/include
  }
  expand(QT5_BINDIR) {
    $QT5_BINDIR
    $(QTDIR)/bin
  }
  expand(QT5_LIBDIR) {
    $QT5_LIBDIR
    $(QTDIR)/lib
  }

  requires += qt5
  includes += $(QT5_INCDIR)
  libpaths += $(QT5_LIBDIR)
  libs += Qt5Core

  // On Linux at least, Qt5 by default requires position independent code
  specific (gnuace) {
    compile_flags += $(PIC)
  }

  specific (prop:microsoft) {
    // On Windows it's possible for Qt to include winsock.h through windows.h
    // which will conflict with winsock2.h. This makes windows.h not include
    // winsock.h
    macros += WIN32_LEAN_AND_MEAN
  }

  Define_Custom(UIC) {
    command          = $(QT5_BINDIR)/uic
    output_option    = -o
    inputext         = .ui
    pre_filename     = ui_
    header_outputext = .h
  }

  Define_Custom(MOC) {
    automatic_in     = 0
    automatic_out    = 0
    command          = $(QT5_BINDIR)/moc
    output_option    = -o
    pch_postrule     = 1
    inputext         = .h
    pre_extension    = _moc
    source_outputext = .cpp
  }

  Define_Custom(QRC) {
    command          = $(QT5_BINDIR)/rcc
    output_option    = -o
    commandflags     = -name <%input_noext%>
    pch_postrule     = 1
    inputext         = .qrc
    pre_extension    = _qrc
    source_outputext = .cpp
  }
}