Team Fortress 2 Source Code as on 22/4/2020
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.

88 lines
2.8 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 LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR"
  11. $Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR" [!$VS2015]
  12. $Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR\2015\release" [$VS2015&&!$WIN32]
  13. $Macro LIBCOMMON "$SRCDIR\lib\common\win32\2015\release" [$VS2015&&$WIN32]
  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]
  33. {
  34. $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)"
  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 ( if not EXIST $OUTLIBDIR 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. "$CRCCHECK" "\n"
  47. }
  48. $PreLinkEvent [!$ANALYZE && !$SOURCESDK]
  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 "$SRCDIR\common\debug_lib_check.cpp" [!$SOURCESDK]
  65. {
  66. $Configuration
  67. {
  68. $Compiler
  69. {
  70. $Create/UsePrecompiledHeader "Not Using Precompiled Headers"
  71. }
  72. }
  73. }
  74. }
  75. }