common.pri 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2010-2020 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 += ../../src/lib
  22. RESOURCES = $$PWD/wkhtmltopdf.qrc
  23. win32: CONFIG += console
  24. win32-g++*: QMAKE_LFLAGS += -static -static-libgcc -static-libstdc++
  25. QT += webkit network xmlpatterns svg
  26. greaterThan(QT_MAJOR_VERSION, 4) {
  27. QT += webkitwidgets
  28. greaterThan(QT_MINOR_VERSION, 2): QT += printsupport
  29. }
  30. # version related information
  31. VERSION_TEXT=$$(WKHTMLTOX_VERSION)
  32. isEmpty(VERSION_TEXT): VERSION_TEXT=$$cat($$PWD/VERSION)
  33. VERSION_LIST=$$split(VERSION_TEXT, "-")
  34. count(VERSION_LIST, 1): VERSION=$$VERSION_TEXT
  35. else: VERSION=$$member(VERSION_LIST, 0)
  36. DEFINES += VERSION=$$VERSION FULL_VERSION=$$VERSION_TEXT BUILDING_WKHTMLTOX