Arif
Arif

Reputation: 966

Integrate qt project with autotool

Can any one give me a step by step instruction to integrate a QT project with autotool project.

Upvotes: 2

Views: 1550

Answers (1)

Andrejs Cainikovs
Andrejs Cainikovs

Reputation: 28474

  1. configure.ac:

    PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [
      AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
      AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
      AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
    ], [
      AC_MSG_ERROR([Qt 4 library not found])
    ])
    
  2. Makefile.am:

    application_CPPFLAGS += $(QT4_CFLAGS)
    application_LDFLAGS  += $(QT4_LIBS)
    

These projects uses autotools and Qt:

Upvotes: 7

Related Questions