ktigcc.pro 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. TEMPLATE = app
  2. LANGUAGE = C++
  3. CONFIG += qt warn_on debug qdbus assistant
  4. QT += xml qt3support
  5. LIBS += -lktexteditor -lkutils -lkdeui -lkdecore -lkio -lkparts -lkde3support
  6. HEADERS += tpr.h \
  7. ktigcc.h \
  8. preferences.h \
  9. srcfile.h \
  10. tiemu.h \
  11. tiemu_stub.h \
  12. callbacks.h \
  13. parsing.h \
  14. colorlistitem.h \
  15. completion.h \
  16. srcfilewin.h \
  17. projectoptions.h \
  18. programoptions.h \
  19. preferencesdlg.h \
  20. mainform.h \
  21. errorlist.h \
  22. programoutput.h \
  23. functions.h \
  24. newsdlg.h \
  25. toolsdlg.h \
  26. toolprops.h \
  27. selectstyle.h \
  28. selectcolors.h \
  29. customstyle.h \
  30. wordlist.h
  31. SOURCES += ktigcc.cpp \
  32. preferences.cpp \
  33. tpr.cpp \
  34. tiemu_stub.cpp \
  35. callbacks.cpp \
  36. parsing.cpp \
  37. completion.cpp \
  38. srcfilewin.cpp \
  39. projectoptions.cpp \
  40. programoptions.cpp \
  41. preferencesdlg.cpp \
  42. mainform.cpp \
  43. errorlist.cpp \
  44. programoutput.cpp \
  45. functions.cpp \
  46. newsdlg.cpp \
  47. toolsdlg.cpp \
  48. toolprops.cpp \
  49. selectstyle.cpp \
  50. selectcolors.cpp \
  51. customstyle.cpp \
  52. wordlist.cpp
  53. FORMS = srcfilewin.ui \
  54. projectoptions.ui \
  55. programoptions.ui \
  56. preferencesdlg.ui \
  57. mainform.ui \
  58. errorlist.ui \
  59. programoutput.ui \
  60. functions.ui \
  61. newsdlg.ui \
  62. toolsdlg.ui \
  63. toolprops.ui \
  64. selectstyle.ui \
  65. selectcolors.ui \
  66. customstyle.ui \
  67. wordlist.ui
  68. RESOURCES += icons.qrc
  69. # If this is not used, a build from /usr/.... will generate
  70. # Makefiles with relative paths for install. This totally
  71. # fucks up using INSTALL_ROOT for a staged install.
  72. # See http://bugs.debian.org/180240
  73. # (Thanks to Debian for the fix for this qmake stupidity.)
  74. QMAKE_PROJECT_DEPTH=1
  75. UI_DIR = .ui
  76. MOC_DIR = .moc
  77. OBJECTS_DIR = .obj
  78. KDEPREFIX = $$system(kde4-config --prefix)
  79. isEmpty(KDEPREFIX):error(KDE 4 kdelibs required.)
  80. exists($$KDEPREFIX/include/kde4/KDE) {
  81. INCLUDEPATH += $$KDEPREFIX/include/kde4
  82. } else:exists($$KDEPREFIX/include/kde/KDE) {
  83. INCLUDEPATH += $$KDEPREFIX/include/kde
  84. } else {
  85. INCLUDEPATH += $$KDEPREFIX/include
  86. }
  87. KDELIBDIR = $$KDEPREFIX/lib$$system(kde4-config --libsuffix)
  88. !equals(KDELIBDIR,/usr/lib):!equals(KDELIBDIR,/usr/lib64) {
  89. QMAKE_LIBDIR = $$KDELIBDIR $$QMAKE_LIBDIR
  90. !darwin-*:!macx-* {
  91. LIBS += -Wl,--rpath,"$$KDELIBDIR"
  92. }
  93. }
  94. GLIB2_MINVERSION = 2.0.0
  95. HAVE_GLIB2 = $$system(pkg-config --atleast-version=$$GLIB2_MINVERSION glib-2.0 && echo yes || echo no)
  96. !equals(HAVE_GLIB2,yes):error(glib2 $$GLIB2_MINVERSION or higher required.)
  97. PKGCONFIG_CFLAGS += $$system(pkg-config --cflags glib-2.0)
  98. LIBS += $$system(pkg-config --libs glib-2.0)
  99. TICONV_MINVERSION = 0.0.1
  100. HAVE_TICONV = $$system(pkg-config --atleast-version=$$TICONV_MINVERSION ticonv && echo yes || echo no)
  101. !equals(HAVE_TICONV,yes):error(libticonv $$TICONV_MINVERSION or higher required.)
  102. PKGCONFIG_CFLAGS += $$system(pkg-config --cflags ticonv)
  103. LIBS += $$system(pkg-config --libs ticonv)
  104. TICABLES_MINVERSION = 0.1.3
  105. HAVE_TICABLES = $$system(pkg-config --atleast-version=$$TICABLES_MINVERSION ticables2 && echo yes || echo no)
  106. !equals(HAVE_TICABLES,yes):error(libticables2 $$TICABLES_MINVERSION or higher required.)
  107. PKGCONFIG_CFLAGS += $$system(pkg-config --cflags ticables2)
  108. LIBS += $$system(pkg-config --libs ticables2)
  109. TIFILES_MINVERSION = 0.0.9
  110. HAVE_TIFILES = $$system(pkg-config --atleast-version=$$TIFILES_MINVERSION tifiles2 && echo yes || echo no)
  111. !equals(HAVE_TIFILES,yes):error(libtifiles2 $$TIFILES_MINVERSION or higher required.)
  112. PKGCONFIG_CFLAGS += $$system(pkg-config --cflags tifiles2)
  113. LIBS += $$system(pkg-config --libs tifiles2)
  114. TICALCS_MINVERSION = 0.2.4
  115. HAVE_TICALCS = $$system(pkg-config --atleast-version=$$TICALCS_MINVERSION ticalcs2 && echo yes || echo no)
  116. !equals(HAVE_TICALCS,yes):error(libticalcs2 $$TICALCS_MINVERSION or higher required.)
  117. PKGCONFIG_CFLAGS += $$system(pkg-config --cflags ticalcs2)
  118. LIBS += $$system(pkg-config --libs ticalcs2)
  119. TIGCC = $$(TIGCC)
  120. isEmpty(TIGCC) {
  121. TIGCC = /usr/local/tigcc
  122. }
  123. target.path = $$TIGCC/bin
  124. documentation.path = $$TIGCC/doc/ktigcc
  125. documentation.files = COPYING NEWS ChangeLog
  126. INSTALLS += target documentation
  127. CXXFLAGS = $$(CXXFLAGS)
  128. isEmpty(CXXFLAGS) {
  129. debug {
  130. CXXFLAGS = -Os -g
  131. } else {
  132. CXXFLAGS = -Os -s -fomit-frame-pointer
  133. }
  134. }
  135. QMAKE_CXXFLAGS_DEBUG = $$CXXFLAGS -Wno-non-virtual-dtor $$PKGCONFIG_CFLAGS
  136. QMAKE_CXXFLAGS_RELEASE = $$CXXFLAGS -Wno-non-virtual-dtor $$PKGCONFIG_CFLAGS
  137. QMAKE_LFLAGS_RELEASE = -s
  138. DISTFILES += $${documentation.files} INSTALL configure KTIGCC.anjuta fedora/ktigcc.spec images/copyright.txt
  139. distbz2.target = dist-bzip2
  140. distbz2.commands = zcat ktigcc.tar.gz | bzip2 --best -c > ktigcc.tar.bz2
  141. distbz2.depends = dist
  142. rpm.target = rpm
  143. # The TAR_OPTIONS=--wildcards is a workaround for rpmbuild 4.4.2 being
  144. # incompatible with tar 1.15.91 (Fedora bug #206841).
  145. rpm.commands = TAR_OPTIONS=--wildcards rpmbuild -ta ktigcc.tar.bz2
  146. rpm.depends = distbz2
  147. QMAKE_EXTRA_UNIX_TARGETS += distbz2 rpm