+
+# if Windows and Qt was built as a static lib then don't set QT_DLL flag
+SET(QT_STATIC 0)
+IF (WIN32)
+ IF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+ FILE(READ ${QT_LIBRARY_DIR}/QtCore.prl QT_CORE_PRL)
+ IF(${QT_CORE_PRL} MATCHES "static")
+ SET(QT_STATIC 1)
+ ENDIF(${QT_CORE_PRL} MATCHES "static")
+ ENDIF(EXISTS ${QT_LIBRARY_DIR}/QtCore.prl)
+ENDIF(WIN32)
+IF(NOT QT_STATIC)
+ ADD_DEFINITIONS(-DQT_DLL)
+ENDIF(NOT QT_STATIC)
+