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.

111 lines
4.0 KiB

  1. //-----------------------------------------------------------------------------
  2. // SOURCE_EXE_WIN_WIN32.VPC
  3. //
  4. // Base Settings for Source(TM) Projects
  5. //-----------------------------------------------------------------------------
  6. $Include "$SRCDIR\vpc_scripts\version.vpc"
  7. $MacroRequired "SRCDIR"
  8. $MacroRequired "OUTBINNAME" "$PROJECTNAME"
  9. $MacroRequired "OUTBINDIR"
  10. $MacroRequired "PLATSUBDIR"
  11. $Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR"
  12. $Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR"
  13. $Include "$SRCDIR\vpc_scripts\loadaddress.vpc"
  14. $Include "$SRCDIR\vpc_scripts\source_exe_win_win32_debug.vpc"
  15. $Include "$SRCDIR\vpc_scripts\source_exe_win_win32_release.vpc"
  16. $Include "$SRCDIR\vpc_scripts\source_win32_base.vpc"
  17. $IgnoreRedundancyWarning "ON"
  18. // Common Configuration
  19. $Configuration
  20. {
  21. $General
  22. {
  23. $TargetName "$OUTBINNAME"
  24. }
  25. $Compiler
  26. {
  27. $PreprocessorDefinitions "$BASE;PLATFORM_64BITS;WIN64;_WIN64;COMPILER_MSVC64" [$WIN64]
  28. $PreprocessorDefinitions "$BASE;COMPILER_MSVC32" [$WIN32]
  29. $PreprocessorDefinitions "$BASE;COMPILER_MSVC;MEMOVERRIDE_MODULE=$PROJECTNAME;_DLL_EXT=$_DLL_EXT"
  30. $PreprocessorDefinitions "$BASE;PS3SDK_INSTALLED" [$PS3SDKINSTALLED]
  31. $PreprocessorDefinitions "$BASE;XDK_INSTALLED" [$XDKINSTALLED]
  32. }
  33. $Compiler [$WIN32]
  34. {
  35. $EnableEnhancedInstructionSet "Streaming SIMD Extensions 2 (/arch:SSE2)"
  36. }
  37. $Linker
  38. {
  39. $AdditionalDependencies "$BASE shell32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib ole32.lib" [$WINDOWS]
  40. $TargetMachine "MachineX86 (/MACHINE:X86)" [$WIN32]
  41. $TargetMachine "MachineX64 (/MACHINE:X64)" [$WIN64]
  42. // Suppress this pointless warning using the undocumented /ignore linker switch
  43. // schemalib.lib(schemaclassinfo.obj) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
  44. $AdditionalOptions "$BASE /ignore:4221"
  45. $AdditionalOptions "$BASE $SRCDIR\lib\public\ftol3.obj" [$VS2013 && $WIN32 && !$DISABLE_FTOL3_OVERRIDE] // Work around CRT bug https://connect.microsoft.com/VisualStudio/feedback/details/806362/vc12-pollutes-the-floating-point-stack-when-casting-infinity-nan-to-unsigned-long#
  46. }
  47. $PreBuildEvent
  48. {
  49. $CommandLine "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  50. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  51. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n"
  52. }
  53. $PostBuildEvent [!$ANALYZE]
  54. {
  55. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" \
  56. "copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$(TargetFileName)" "\n" \
  57. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  58. "if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" \
  59. "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
  60. "copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
  61. "if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
  62. "goto BuildEventOK" "\n" \
  63. ":BuildEventFailed" "\n" \
  64. "echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
  65. "del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
  66. "exit 1" "\n" \
  67. ":BuildEventOK" "\n"
  68. $Description "Publishing to $OUTBINDIR"
  69. $ExcludedFromBuild "No"
  70. }
  71. }
  72. // Skeleton Project - All derived projects get this as a starting base
  73. $Project
  74. {
  75. $Folder "Source Files"
  76. {
  77. $File "$SRCDIR\public\tier0\memoverride.cpp"
  78. {
  79. $Configuration
  80. {
  81. $Compiler
  82. {
  83. $Create/UsePrecompiledHeader "Not Using Precompiled Headers"
  84. }
  85. }
  86. }
  87. }
  88. $Folder "Link Libraries"
  89. {
  90. $Implib "$LIBPUBLIC\tier0"
  91. $Lib "$LIBPUBLIC\tier1"
  92. $Lib "$LIBPUBLIC\interfaces"
  93. $Implib "$LIBPUBLIC\vstdlib"
  94. }
  95. }