diff --git a/win32/vs2015/PreBuild.bat b/win32/vs2015/PreBuild.bat new file mode 100644 index 0000000..9d2f8b1 --- /dev/null +++ b/win32/vs2015/PreBuild.bat @@ -0,0 +1,9 @@ +set /p VERSION= < %~dp0..\..\VERSION + +:config.h +echo> .\config.h #define TCC_VERSION "%VERSION%" +echo>> .\config.h #ifdef TCC_TARGET_X86_64 +echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/64;{B}/lib" +echo>> .\config.h #else +echo>> .\config.h #define CONFIG_TCC_LIBPATHS "{B}/lib/32;{B}/lib" +echo>> .\config.h #endif diff --git a/win32/vs2015/libtcc.vcxproj b/win32/vs2015/libtcc.vcxproj index d8c45a4..af179c3 100644 --- a/win32/vs2015/libtcc.vcxproj +++ b/win32/vs2015/libtcc.vcxproj @@ -71,15 +71,19 @@ true + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); true + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); false + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); false + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); @@ -88,6 +92,7 @@ Level3 Disabled ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EditAndContinue Windows @@ -96,6 +101,12 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + + + Generate config.h + @@ -104,6 +115,7 @@ Level3 Disabled ONE_SOURCE;LIBTCC_AS_DLL;TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_WINDOWS;_USRDLL;LIBTCC_EXPORTS;%(PreprocessorDefinitions) + EditAndContinue Windows @@ -112,6 +124,12 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + + + Generate config.h + @@ -132,6 +150,12 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + + + Generate config.h + @@ -152,6 +176,12 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + + + Generate config.h + diff --git a/win32/vs2015/tcc.vcxproj b/win32/vs2015/tcc.vcxproj index 7417358..29543d7 100644 --- a/win32/vs2015/tcc.vcxproj +++ b/win32/vs2015/tcc.vcxproj @@ -71,15 +71,19 @@ true + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); true + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); false + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); false + $(ProjectDir);$(VC_IncludePath);$(WindowsSDK_IncludePath); @@ -88,6 +92,7 @@ Level3 Disabled TCC_TARGET_PE;TCC_TARGET_I386;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EditAndContinue Console @@ -98,6 +103,10 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + Generate config.h + @@ -106,6 +115,7 @@ Level3 Disabled TCC_TARGET_PE;TCC_TARGET_X86_64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EditAndContinue Console @@ -116,6 +126,10 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + Generate config.h + @@ -138,6 +152,10 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + Generate config.h + @@ -160,6 +178,10 @@ copy $(TargetPath) $(SolutionDir).. + + $(ProjectDir)PreBuild.bat + Generate config.h +