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.

89 lines
2.7 KiB

  1. //-----------------------------------------------------------------------------
  2. // SOURCE_LIB_WIN32_BASE.VPC
  3. //
  4. // Base Settings for all Source(TM) Projects
  5. //-----------------------------------------------------------------------------
  6. $Include "$SRCDIR\vpc_scripts\version.vpc"
  7. $MacroRequired "SRCDIR"
  8. $MacroRequired "OUTLIBNAME" "$PROJECTNAME"
  9. $MacroRequired "OUTLIBDIR"
  10. $Macro PLATSUBDIR "\." [$WIN32]
  11. $Macro PLATSUBDIR "\x64" [$WIN64]
  12. $Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR"
  13. $Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR"
  14. $Include "$SRCDIR\vpc_scripts\source_lib_win32_debug.vpc"
  15. $Include "$SRCDIR\vpc_scripts\source_lib_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 "$OUTLIBNAME"
  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;_DLL_EXT=$_DLL_EXT"
  30. $PreprocessorDefinitions "$BASE;LIBNAME=$OUTLIBNAME"
  31. }
  32. $Compiler [$WIN32] // This is already enabled for WIN64.
  33. {
  34. $EnableEnhancedInstructionSet "Streaming SIMD Extensions 2 (/arch:SSE2)"
  35. }
  36. $PreBuildEvent
  37. {
  38. $CommandLine "if EXIST $OUTLIBDIR\$(TargetName).lib ( for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTLIBDIR\$(TargetName).lib$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
  39. ") else ( mkdir $OUTLIBDIR )" "\n" \
  40. "set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
  41. "if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE (" "\n" \
  42. " attrib -r $OUTLIBDIR\$(TargetName).lib" "\n" \
  43. " $SRCDIR\devtools\bin\gnu\touch.exe -d $QUOTE1999-01-01$QUOTE $OUTLIBDIR\$(TargetName).lib" "\n" \
  44. " attrib +r $OUTLIBDIR\$(TargetName).lib" "\n" \
  45. ")" "\n" \
  46. "$HOST_VPC_EXE -crc2 $QUOTE$VPC_OUTPUT_FILE$QUOTE" "\n"
  47. }
  48. $PreLinkEvent
  49. {
  50. $CommandLine "call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTLIBDIR\$(TargetName).lib $SRCDIR"
  51. }
  52. $Librarian
  53. {
  54. // Suppress this warning using the undocumented /ignore linker switch
  55. // 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
  56. $AdditionalOptions "$BASE /ignore:4221"
  57. }
  58. }
  59. // Skeleton Project - All derived projects get this as a starting base
  60. $Project
  61. {
  62. $Folder "Source Files"
  63. {
  64. $File_NoPCH "$SRCDIR\common\debug_lib_check.cpp"
  65. {
  66. $BuildOrderModifier "0x00000001"
  67. $Configuration
  68. {
  69. $Compiler
  70. {
  71. $Create/UsePrecompiledHeader "Not Using Precompiled Headers"
  72. }
  73. }
  74. }
  75. }
  76. }