Counter Strike : Global Offensive Source Code
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.

80 lines
3.7 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // VPC macros common to all Qt-based projects. Gives access to Qt headers and
  4. // provides build rules for Qt's custom build steps.
  5. //
  6. //-----------------------------------------------------------------------------
  7. $Macro QT_ROOT "$SRCDIR\thirdparty\lgpl\qt"
  8. $Macro QT_MOC_TOOL "$QT_ROOT\bin\moc.exe"
  9. $Macro QT_UI_TOOL "$QT_ROOT\bin\uic.exe"
  10. $Macro QT_QRC_TOOL "$QT_ROOT\bin\rcc.exe"
  11. $Macro QT_TARGET_SUBDIR "generated_code_DO_NOT_CHECK_THESE_IN"
  12. $Macro QT_MOC_DEFINES "-DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -D_MSC_VER=1400"
  13. $Macro QT_MOC_INCLUDES "-I;$QT_ROOT\include\QtCore; -I;$QT_ROOT\include\QtGui; -I;$QT_ROOT\include; -I;$QT_ROOT\include\ActiveQt; -I;.; -I;$QT_ROOT\mkspecs\win32-msvc2005"
  14. $Macro QT_MOC_COMMAND_PREFIX "$QT_MOC_TOOL $QT_MOC_DEFINES $QT_MOC_INCLUDES"
  15. $Macro QT_UI_COMMAND_PREFIX "$QT_UI_TOOL"
  16. $Macro QT_QRC_COMMAND_PREFIX "$QT_QRC_TOOL"
  17. //-----------------------------------------------------------------------------
  18. // NOTE: The standard here is that the terminal _H, _MOC, _UI is for the extension
  19. // that it is processing.
  20. //-----------------------------------------------------------------------------
  21. $Macro QT_OUTPUT_H "$(InputDir)$QT_TARGET_SUBDIR\moc_$(InputName).cpp"
  22. $Macro QT_OUTPUT_MOC "$(InputPath)"
  23. $Macro QT_OUTPUT_UI "$(InputDir)$QT_TARGET_SUBDIR\ui_$(InputName).h"
  24. $Macro QT_OUTPUT_QRC "$(InputDir)$QT_TARGET_SUBDIR\qrc_$(InputName).cpp"
  25. $Macro QT_COMMAND_SUFFIX_H "$(InputPath) -o $QT_OUTPUT_H"
  26. $Macro QT_COMMAND_SUFFIX_MOC "$(InputName).cpp -o $QT_OUTPUT_MOC"
  27. $Macro QT_COMMAND_SUFFIX_UI "$(InputPath) -o $QT_OUTPUT_UI"
  28. $Macro QT_COMMAND_SUFFIX_QRC "$(InputPath) -o $QT_OUTPUT_QRC"
  29. $Macro QT_DESCRIPTION_H "Processing QT Keywords: $(InputFileName)"
  30. $Macro QT_DESCRIPTION_MOC "Processing QT Keywords: $(InputFileName)"
  31. $Macro QT_DESCRIPTION_UI "Processing UI Form: $(InputFileName)"
  32. $Macro QT_DESCRIPTION_QRC "Processing QRC: $(InputFileName)"
  33. $Macro QT_PREBUILD_H "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QT_OUTPUT_H $SRCDIR " "\n"
  34. $Macro QT_PREBUILD_MOC "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QT_OUTPUT_MOC $SRCDIR " "\n"
  35. $Macro QT_PREBUILD_UI "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QT_OUTPUT_UI $SRCDIR " "\n"
  36. $Macro QT_PREBUILD_QRC "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $QT_OUTPUT_QRC $SRCDIR " "\n"
  37. $Macro QT_CUSTOM_BUILD_H "$QT_PREBUILD_H $QT_MOC_COMMAND_PREFIX $QT_COMMAND_SUFFIX_H"
  38. $Macro QT_CUSTOM_BUILD_MOC "$QT_PREBUILD_MOC $QT_MOC_COMMAND_PREFIX $QT_COMMAND_SUFFIX_MOC"
  39. $Macro QT_CUSTOM_BUILD_UI "$QT_PREBUILD_UI $QT_UI_COMMAND_PREFIX $QT_COMMAND_SUFFIX_UI"
  40. $Macro QT_CUSTOM_BUILD_QRC "$QT_PREBUILD_QRC $QT_QRC_COMMAND_PREFIX $QT_COMMAND_SUFFIX_QRC"
  41. // <xxxx>.cpp files that have Q_OBJECT need to have moc.exe run on them to generate <xxxx>.moc
  42. // having a <xxxx>.moc in the project guarantees a pre build dependency and runs moc.exe on the <xxxx>.cpp file
  43. // <xxxx>.cpp is expected to have a #include "xxxx.moc" at its bottom.
  44. // There was no way with vcproj's to express this multiple phase generate->build pattern.
  45. $CustomBuildStep "moc"
  46. {
  47. $AdditionalDependencies "$(InputName).cpp"
  48. $CommandLine "$QT_CUSTOM_BUILD_MOC"
  49. $Description "$QT_DESCRIPTION_MOC"
  50. $Outputs "$QT_OUTPUT_MOC"
  51. }
  52. // <xxxx>.ui files need to have uic.exe run on them to generate <xxxx>.h
  53. $CustomBuildStep "ui"
  54. {
  55. $CommandLine "$QT_CUSTOM_BUILD_UI"
  56. $Description "$QT_DESCRIPTION_UI"
  57. $Outputs "$QT_OUTPUT_UI"
  58. }
  59. $CustomBuildStep "qrc"
  60. {
  61. $AdditionalDependencies "$(InputName).cpp"
  62. $CommandLine "$QT_CUSTOM_BUILD_QRC"
  63. $Description "$QT_DESCRIPTION_QRC"
  64. $Outputs "$QT_OUTPUT_QRC"
  65. }