common.pri 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 2010, 2011 wkhtmltopdf authors
  2. #
  3. # This file is part of wkhtmltopdf.
  4. #
  5. # wkhtmltopdf is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # wkhtmltopdf is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Lesser General Public License
  16. # along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.
  17. CONFIG(static, shared|static):lessThan(QT_MAJOR_VERSION, 5) {
  18. DEFINES += QT4_STATICPLUGIN_TEXTCODECS
  19. QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
  20. }
  21. INCLUDEPATH += ../../include
  22. RESOURCES = $$PWD/wkhtmltopdf.qrc
  23. win32: CONFIG += console
  24. QT += webkit network xmlpatterns svg
  25. greaterThan(QT_MAJOR_VERSION, 4) {
  26. QT += webkitwidgets
  27. greaterThan(QT_MINOR_VERSION, 2): QT += printsupport
  28. }
  29. # version related information
  30. VERSION_TEXT=$$(WKHTMLTOX_VERSION)
  31. isEmpty(VERSION_TEXT): VERSION_TEXT=$$cat($$PWD/VERSION)
  32. VERSION_LIST=$$split(VERSION_TEXT, "-")
  33. count(VERSION_LIST, 1): VERSION=$$VERSION_TEXT
  34. else: VERSION=$$member(VERSION_LIST, 0)
  35. DEFINES += VERSION=$$VERSION FULL_VERSION=$$VERSION_TEXT