QFramelessWindow.pro 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. QT += widgets core gui xml svg
  2. win32: {
  3. QT += winextras
  4. }
  5. TEMPLATE = lib
  6. CONFIG += staticlib
  7. CONFIG += c++11
  8. # You can make your code fail to compile if it uses deprecated APIs.
  9. # In order to do so, uncomment the following line.
  10. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  11. #-------------------------------------------------------------------------------
  12. # Compiler options
  13. #-------------------------------------------------------------------------------
  14. *g++*: {
  15. QMAKE_CXXFLAGS_RELEASE -= -O
  16. QMAKE_CXXFLAGS_RELEASE *= -O3
  17. }
  18. *msvc*: {
  19. QMAKE_CFLAGS += /utf-8
  20. QMAKE_CXXFLAGS += /utf-8
  21. QMAKE_CXXFLAGS_RELEASE -= /O
  22. QMAKE_CXXFLAGS_RELEASE *= /O2
  23. }
  24. CONFIG(debug, release|debug){
  25. win32:TARGET = qframelesswindowd
  26. else:TARGET = qframelesswindow
  27. } else {
  28. TARGET = qframelesswindow
  29. }
  30. SOURCES += \
  31. titlebar/TitleBar.cpp \
  32. titlebar/TitleBarButton.cpp \
  33. utils/Win32Utils.cpp \
  34. widgetResizeHandler/WidgetResizeHandler.cpp \
  35. windows/WindowsFramelessHelper.cpp
  36. HEADERS += \
  37. QFramelessWindow.h \
  38. titlebar/TitleBar.h \
  39. titlebar/TitleBarButton.h \
  40. utils/Win32Utils.h \
  41. widgetResizeHandler/WidgetResizeHandler.h \
  42. windows/WindowsFramelessHelper.h
  43. #-------------------------------------------------------------------------------
  44. # Build options
  45. #-------------------------------------------------------------------------------
  46. DESTDIR = $$PWD/../bin #指定生成的应用程序放置的路径
  47. LIBS += -L$$PWD/../bin #指定生成的库文件放置的路径,与应用程序放在一起
  48. # Default rules for deployment.
  49. unix {
  50. target.path = $$[QT_INSTALL_PLUGINS]/generic
  51. }
  52. !isEmpty(target.path): INSTALLS += target
  53. RESOURCES += \
  54. qframelesswindow.qrc