qwtpolarfunctions.pri 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # -*- mode: sh -*- ##############################################
  2. # QwtPolar Widget Library
  3. # Copyright (C) 2008 Uwe Rathmann
  4. #
  5. # This library is free software; you can redistribute it and/or
  6. # modify it under the terms of the Qwt License, Version 1.0
  7. #################################################################
  8. # Copied and modified from qt_functions.prf
  9. defineReplace(qwtPolarLibraryTarget) {
  10. unset(LIBRARY_NAME)
  11. LIBRARY_NAME = $$1
  12. mac:contains(QWT_POLAR_CONFIG, QwtPolarFramework) {
  13. QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
  14. export(QMAKE_FRAMEWORK_BUNDLE_NAME)
  15. }
  16. contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
  17. !debug_and_release|build_pass {
  18. mac:RET = $$member(LIBRARY_NAME, 0)_debug
  19. win32:RET = $$member(LIBRARY_NAME, 0)d
  20. }
  21. }
  22. isEmpty(RET):RET = $$LIBRARY_NAME
  23. return($$RET)
  24. }
  25. defineTest(qwtPolarAddLibrary) {
  26. LIB_NAME = $$1
  27. unset(LINKAGE)
  28. mac:contains(QWT_POLAR_CONFIG, QwtPolarFramework) {
  29. LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
  30. }
  31. isEmpty(LINKAGE) {
  32. if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
  33. mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
  34. win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
  35. }
  36. }
  37. isEmpty(LINKAGE) {
  38. LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
  39. }
  40. !isEmpty(QMAKE_LSB) {
  41. QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
  42. }
  43. LIBS += $$LINKAGE
  44. export(LIBS)
  45. export(QMAKE_LFLAGS)
  46. return(true)
  47. }