129 lines
4.6 KiB
Plaintext
129 lines
4.6 KiB
Plaintext
//-----------------------------------------------------------------------------
|
|
// SOURCE_DLL_WIN32_BASE.VPC
|
|
//
|
|
// Base Settings for all Source(TM) Projects
|
|
//-----------------------------------------------------------------------------
|
|
|
|
$Include "$SRCDIR\vpc_scripts\version.vpc"
|
|
|
|
$MacroRequired "SRCDIR"
|
|
$MacroRequired "OUTBINNAME" "$PROJECTNAME"
|
|
$MacroRequired "OUTBINDIR"
|
|
|
|
$Macro PLATSUBDIR "\." [$WIN32]
|
|
$Macro PLATSUBDIR "\x64" [$WIN64]
|
|
$Macro OUTBINDIR "$OUTBINDIR$PLATSUBDIR"
|
|
$Macro LIBPUBLIC "$SRCDIR\lib\public$PLATSUBDIR"
|
|
$Macro LIBCOMMON "$SRCDIR\lib\common$PLATSUBDIR"
|
|
|
|
$Include "$SRCDIR\vpc_scripts\loadaddress.vpc"
|
|
$Include "$SRCDIR\vpc_scripts\source_dll_win32_debug.vpc"
|
|
$Include "$SRCDIR\vpc_scripts\source_dll_win32_release.vpc"
|
|
$Include "$SRCDIR\vpc_scripts\source_win32_base.vpc"
|
|
|
|
$IgnoreRedundancyWarning "ON"
|
|
|
|
// Common Configuration
|
|
$Configuration
|
|
{
|
|
$General
|
|
{
|
|
$TargetName "$OUTBINNAME"
|
|
}
|
|
|
|
$Compiler
|
|
{
|
|
$PreprocessorDefinitions "$BASE;PLATFORM_64BITS;WIN64;_WIN64;COMPILER_MSVC64" [$WIN64]
|
|
$PreprocessorDefinitions "$BASE;COMPILER_MSVC32" [$WIN32]
|
|
$PreprocessorDefinitions "$BASE;COMPILER_MSVC;MEMOVERRIDE_MODULE=$PROJECTNAME;_DLL_EXT=$_DLL_EXT"
|
|
$PreprocessorDefinitions "$BASE;DLLNAME=$OUTBINNAME"
|
|
$PreprocessorDefinitions "$BASE;PS3SDK_INSTALLED" [$PS3SDKINSTALLED]
|
|
$PreprocessorDefinitions "$BASE;XDK_INSTALLED" [$XDKINSTALLED]
|
|
}
|
|
|
|
$Compiler [$WIN32] // This is already enabled for WIN64.
|
|
{
|
|
$EnableEnhancedInstructionSet "Streaming SIMD Extensions 2 (/arch:SSE2)"
|
|
}
|
|
|
|
$Linker
|
|
{
|
|
$AdditionalDependencies "$BASE shell32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib ole32.lib" [$WINDOWS]
|
|
$TargetMachine "MachineX86 (/MACHINE:X86)" [$WIN32]
|
|
$TargetMachine "MachineX64 (/MACHINE:X64)" [$WIN64]
|
|
// Suppress this pointless warning using the undocumented /ignore linker switch
|
|
// 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
|
|
$AdditionalOptions "$BASE /ignore:4221"
|
|
$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#
|
|
}
|
|
|
|
$PreBuildEvent
|
|
{
|
|
$CommandLine "if EXIST $OUTBINDIR\$(TargetFileName) for /f $QUOTEdelims=$QUOTE %%A in ('attrib $QUOTE$OUTBINDIR\$(TargetFileName)$QUOTE') do set valveTmpIsReadOnly=$QUOTE%%A$QUOTE" "\n" \
|
|
"set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%" "\n" \
|
|
"if $QUOTE%valveTmpIsReadOnlyLetter%$QUOTE==$QUOTER$QUOTE del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
|
|
"$HOST_VPC_EXE -crc2 $QUOTE$VPC_OUTPUT_FILE$QUOTE" "\n"
|
|
}
|
|
|
|
$PostBuildEvent [!$ANALYZE]
|
|
{
|
|
$CommandLine "if exist $OUTBINDIR goto ValveStart" "\n" \
|
|
"mkdir $OUTBINDIR" "\n" \
|
|
":ValveStart" "\n" \
|
|
"call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetFileName) $SRCDIR" "\n" \
|
|
"copy $QUOTE$(TargetDir)$QUOTE$(TargetFileName) $OUTBINDIR\$(TargetFileName)" "\n" \
|
|
"if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
|
|
"if exist $QUOTE$(TargetDir)$QUOTE$(TargetName).map copy $QUOTE$(TargetDir)$QUOTE$(TargetName).map $OUTBINDIR\$(TargetName).map" "\n" \
|
|
"call $SRCDIR\vpc_scripts\valve_p4_edit.cmd $OUTBINDIR\$(TargetName).pdb $SRCDIR" "\n" \
|
|
"copy $QUOTE$(TargetDir)$QUOTE$(TargetName).pdb $OUTBINDIR\$(TargetName).pdb" "\n" \
|
|
"if ERRORLEVEL 1 goto BuildEventFailed" "\n" \
|
|
"goto BuildEventOK" "\n" \
|
|
":BuildEventFailed" "\n" \
|
|
"echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***" "\n" \
|
|
"del /q $QUOTE$(TargetDir)$QUOTE$(TargetFileName)" "\n" \
|
|
"exit 1" "\n" \
|
|
":BuildEventOK" "\n"
|
|
$Description "Publishing to $OUTBINDIR"
|
|
$ExcludedFromBuild "No"
|
|
}
|
|
}
|
|
|
|
// Skeleton Project - All derived projects get this as a starting base
|
|
$Project
|
|
{
|
|
$Folder "Source Files"
|
|
{
|
|
$File_NoPCH "$SRCDIR\public\tier0\memoverride.cpp"
|
|
{
|
|
$BuildOrderModifier "0x00000001"
|
|
$Configuration
|
|
{
|
|
$Compiler
|
|
{
|
|
$Create/UsePrecompiledHeader "Not Using Precompiled Headers"
|
|
}
|
|
}
|
|
}
|
|
$File_NoPCH "$SRCDIR\common\debug_dll_check.cpp"
|
|
{
|
|
$BuildOrderModifier "0x00000001"
|
|
$Configuration
|
|
{
|
|
$Compiler
|
|
{
|
|
$Create/UsePrecompiledHeader "Not Using Precompiled Headers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$Folder "Link Libraries"
|
|
{
|
|
$Implib "tier0"
|
|
$Lib "tier1"
|
|
$Lib "interfaces"
|
|
$Implib "vstdlib"
|
|
}
|
|
}
|
|
|