Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

qextserialport.pro 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ############################### *User Config* ###############################
  2. # Uncomment following line if you want to build a static library
  3. # CONFIG += qesp_static
  4. # Uncomment following line if you want to build framework for mac
  5. # macx:CONFIG += qesp_mac_framework
  6. # Uncomment following line if you want to enable udev for linux
  7. # linux*:CONFIG += qesp_linux_udev
  8. # Note: you can create a ".qmake.cache" file, then copy these lines to it.
  9. # If so, you can avoid to change this project file.
  10. ############################### *User Config* ###############################
  11. defineReplace(qextLibraryName) {
  12. unset(LIBRARY_NAME)
  13. LIBRARY_NAME = $$1
  14. macx:qesp_mac_framework {
  15. QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
  16. export(QMAKE_FRAMEWORK_BUNDLE_NAME)
  17. } else {
  18. greaterThan(QT_MAJOR_VERSION, 4):LIBRARY_NAME ~= s,^Qt,Qt$$QT_MAJOR_VERSION,
  19. }
  20. CONFIG(debug, debug|release) {
  21. !debug_and_release|build_pass {
  22. mac:LIBRARY_NAME = $${LIBRARY_NAME}_debug
  23. else:win32:LIBRARY_NAME = $${LIBRARY_NAME}d
  24. }
  25. }
  26. return($$LIBRARY_NAME)
  27. }
  28. TEMPLATE=lib
  29. include(src/qextserialport.pri)
  30. #create_prl is needed, otherwise, MinGW can't found libqextserialport1.a
  31. CONFIG += create_prl
  32. #mac framework is designed for shared library
  33. macx:qesp_mac_framework:qesp_static: CONFIG -= qesp_static
  34. !macx:qesp_mac_framework:CONFIG -= qesp_mac_framework
  35. qesp_static {
  36. CONFIG += static
  37. } else {
  38. CONFIG += shared
  39. macx:!qesp_mac_framework:CONFIG += absolute_library_soname
  40. DEFINES += QEXTSERIALPORT_BUILD_SHARED
  41. }
  42. #Creare lib bundle for mac
  43. macx:qesp_mac_framework {
  44. CONFIG += lib_bundle
  45. FRAMEWORK_HEADERS.files = $$PUBLIC_HEADERS
  46. FRAMEWORK_HEADERS.path = Headers
  47. QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
  48. }
  49. win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
  50. #For non-windows system, only depends on QtCore module
  51. unix:QT = core
  52. else:QT = core gui
  53. #generate proper library name
  54. greaterThan(QT_MAJOR_VERSION, 4) {
  55. QESP_LIB_BASENAME = QtExtSerialPort
  56. } else {
  57. QESP_LIB_BASENAME = qextserialport
  58. }
  59. TARGET = $$qextLibraryName($$QESP_LIB_BASENAME)
  60. VERSION = 1.2.0
  61. # generate feature file by qmake based on this *.in file.
  62. QMAKE_SUBSTITUTES += extserialport.prf.in
  63. OTHER_FILES += extserialport.prf.in
  64. # for make docs
  65. include(doc/doc.pri)
  66. # for make install
  67. win32:!qesp_static {
  68. dlltarget.path = $$[QT_INSTALL_BINS]
  69. INSTALLS += dlltarget
  70. }
  71. !macx|!qesp_mac_framework {
  72. headers.files = $$PUBLIC_HEADERS
  73. headers.path = $$[QT_INSTALL_HEADERS]/QtExtSerialPort
  74. INSTALLS += headers
  75. }
  76. target.path = $$[QT_INSTALL_LIBS]
  77. features.files = extserialport.prf
  78. features.path = $$[QMAKE_MKSPECS]/features
  79. INSTALLS += target features