File: findpoppler.pri

package info (click to toggle)
ktikz 0.13.1%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,136 kB
  • sloc: cpp: 10,491; xml: 701; sh: 131; makefile: 19
file content (25 lines) | stat: -rw-r--r-- 831 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
unix:!macx {
#	QMAKE_CXXFLAGS += `pkg-config --cflags poppler-qt4`
#	QMAKE_LFLAGS += `pkg-config --libs poppler-qt4` # using this, qmake adds 3 times "--libs" to the LFLAGS, which is not recognized by g++ 4.6
	PKG_CONFIG = $$pkgConfigExecutable()
	greaterThan(QT_MAJOR_VERSION, 4) {
		POPPLERINCLUDES = $$system($$PKG_CONFIG --cflags poppler-qt5)
		POPPLERLIBS = $$system($$PKG_CONFIG --libs poppler-qt5)
	} else {
		POPPLERINCLUDES = $$system($$PKG_CONFIG --cflags poppler-qt4)
		POPPLERLIBS = $$system($$PKG_CONFIG --libs poppler-qt4)
	}
	QMAKE_CXXFLAGS += $$POPPLERINCLUDES
	QMAKE_LFLAGS += $$POPPLERLIBS
}

win32 {
	INCLUDEPATH += $${_PRO_FILE_PWD_}/app $${_PRO_FILE_PWD_}/win32/poppler
	LIBS += -L$${_PRO_FILE_PWD_}/win32/poppler/
}

greaterThan(QT_MAJOR_VERSION, 4) {
	LIBS += -lpoppler-qt5
} else {
	LIBS += -lpoppler-qt4
}