2011-03-03 101 views

回答

7
  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) 
    

這些項目使用自動工具和Qt: