common.pri 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # ================================================== #
  2. message(================QT INFO====================)
  3. message(Qt version: $$[QT_VERSION])
  4. message(Qt is installed in $$[QT_INSTALL_PREFIX])
  5. # ================================================== #
  6. PROJECT_ROOT_PATH = $${PWD}/
  7. win32: OS_SUFFIX = win32
  8. linux-g++: OS_SUFFIX = linux
  9. CONFIG(debug, debug|release) {
  10. BUILD_FLAG = debug
  11. LIB_SUFFIX = d
  12. } else {
  13. BUILD_FLAG = release
  14. }
  15. LIBS_PATH = $${PROJECT_ROOT_PATH}/lib.$${OS_SUFFIX}/
  16. INC_PATH = $${PROJECT_ROOT_PATH}/include/
  17. IMPORT_PATH = $${PROJECT_ROOT_PATH}/import/
  18. BIN_PATH = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG}/
  19. BUILD_PATH = $${PROJECT_ROOT_PATH}/build/$${BUILD_FLAG}/$${TARGET}/
  20. RCC_DIR = $${BUILD_PATH}/rcc/
  21. UI_DIR = $${BUILD_PATH}/ui/
  22. MOC_DIR = $${BUILD_PATH}/moc/
  23. OBJECTS_DIR = $${BUILD_PATH}/obj/
  24. LIBS += -L$${LIBS_PATH}/
  25. INCLUDEPATH += $${INC_PATH}/
  26. INCLUDEPATH += $${IMPORT_PATH}/
  27. QMAKE_CXXFLAGS += -O2 -std=c++14
  28. # The following define makes your compiler emit warnings if you use
  29. # any feature of Qt which has been marked as deprecated (the exact warnings
  30. # depend on your compiler). Please consult the documentation of the
  31. # deprecated API in order to know how to port your code away from it.
  32. DEFINES += QT_DEPRECATED_WARNINGS
  33. # You can also make your code fail to compile if you use deprecated APIs.
  34. # In order to do so, uncomment the following line.
  35. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  36. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0