common.pri 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # COMMENT THIS FOR MAKE PRODUCTION BUILDS
  2. # DEFINES += DEBUG
  3. # DEFINES += DEBUG_EXPIRE=1609448400 # 01.01.2021 00:00:00
  4. # ================================================== #
  5. message(================QT INFO====================)
  6. message(Qt version: $$[QT_VERSION])
  7. message(Qt is installed in $$[QT_INSTALL_PREFIX])
  8. # ================================================== #
  9. PROJECT_ROOT_PATH = $${PWD}/
  10. win32: OS_SUFFIX = win32
  11. linux-g++: OS_SUFFIX = linux
  12. CONFIG(debug, debug|release) {
  13. BUILD_FLAG = debug
  14. LIB_SUFFIX = d
  15. } else {
  16. BUILD_FLAG = release
  17. }
  18. LIBS_PATH = $${PROJECT_ROOT_PATH}/lib.$${OS_SUFFIX}/
  19. INC_PATH = $${PROJECT_ROOT_PATH}/include/
  20. IMPORT_PATH = $${PROJECT_ROOT_PATH}/import/
  21. BIN_PATH = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG}/
  22. BUILD_PATH = $${PROJECT_ROOT_PATH}/build/$${BUILD_FLAG}/$${TARGET}/
  23. RCC_DIR = $${BUILD_PATH}/rcc/
  24. UI_DIR = $${BUILD_PATH}/ui/
  25. MOC_DIR = $${BUILD_PATH}/moc/
  26. OBJECTS_DIR = $${BUILD_PATH}/obj/
  27. LIBS += -L$${LIBS_PATH}/
  28. INCLUDEPATH += $${INC_PATH}/
  29. INCLUDEPATH += $${IMPORT_PATH}/
  30. QMAKE_CXXFLAGS += -O2 -std=c++14
  31. # The following define makes your compiler emit warnings if you use
  32. # any feature of Qt which has been marked as deprecated (the exact warnings
  33. # depend on your compiler). Please consult the documentation of the
  34. # deprecated API in order to know how to port your code away from it.
  35. DEFINES += QT_DEPRECATED_WARNINGS
  36. # You can also make your code fail to compile if you use deprecated APIs.
  37. # In order to do so, uncomment the following line.
  38. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  39. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  40. win32 {
  41. # Installing manifests
  42. # This variable should navigate to mt.exe file
  43. WINDOWS_SDK_MT_EXE_PATH = C:/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64/mt.exe
  44. MANIFESTS_DIR = $$replace(PROJECT_ROOT_PATH, /, \\)\\manifests
  45. BUILD_DIR= $$replace(BIN_PATH, /, \\)
  46. QMAKE_POST_LINK = "\"$$WINDOWS_SDK_MT_EXE_PATH\" -manifest $$quote($$MANIFESTS_DIR\\$$basename(TARGET).manifest) -outputresource:$$quote($$BUILD_DIR\\$$basename(TARGET).exe;1)"
  47. }