gilgamash
gilgamash

Reputation: 902

Qt Creator Cross Development and Windows DLLs

I scrawled to the existing QT cross compilation question but could not find an answer, so I will give it a shot: I want to use QT creator for a platform independent (to be more exact Linux, Win and OS X, maybe at some time even Android) program which is basically completely programmed already.

However, the source needs libhpdf (aka libharu) and along with her both libgng and libz, which are a pain when to be compiled under windows. I thus considered including the libhpdf dll, and here comes my question: Any idea how to include the dll in the WINDOWS compilation only? Is there a way to setup the QT project in such a manner? In Linux & OS X I would like to include the original libharu code and just link libpng and libz.

Thanks a lot for help, G.

Upvotes: 1

Views: 263

Answers (1)

cmannett85
cmannett85

Reputation: 22346

You can configure qmake to adapt to environment changes, see the docs here. A simple example would be:

win32 {
    LIBS += -lhpdf -l...
} else {
    LIBS += -lharu -l...
}

Upvotes: 2

Related Questions