Projects for Visual Studio 2012 Express
[amule.git] / platforms / Windows / MSVC11 / makeconfig.cmd
blob0eaf27d1c3943fd2d8dba4cabd4a7fc6c133c3b0
1 @echo off
2 echo #ifndef CONFIG_H>config.h
3 echo #define CONFIG_H>>config.h
5 rem Tarballs have a .svn-revision for identification
6 if not exist .svn-revision goto svn1
7 FOR /F %%i IN (.svn-revision) DO set svnv=%%i
8 goto :foundsvnversion
10 :svn1
11 rem Try to get version from a SVN working copy, svnversion must be in path
12 set svnv=exported
13 call svnversion >nul 2>&1
14 if errorlevel 1 goto nosvnversion
15 FOR /F %%i IN ('svnversion src') DO set svnv=%%i
16 if %svnv%==exported goto nosvnversion
17 if %svnv%==Unversioned goto nosvnversion
19 :foundsvnversion
20 echo SVNDATE is %svnv%
21 echo #define SVNDATE "rev. %svnv%">>config.h
22 echo #define VERSION "SVN">>config.h
23 echo #define __PRERELEASE__>>config.h
24 goto boost1
26 :nosvnversion
27 echo release build, version from ^<common/ClientVersion.h^>
28 echo #include ^<src/include/common/ClientVersion.h^> >>config.h
30 :boost1
31 if not exist ..\boost\boost\asio.hpp goto boost2
32 if not exist ..\boost\libs\system\src\error_code.cpp goto boost2
33 echo Boost detected, using Asio sockets
34 echo #define ASIO_SOCKETS>>config.h
35 echo #define HAVE_BOOST_SOURCES>>config.h
36 goto finish
37 :boost2
38 echo no Boost found, using wx sockets
40 :finish
41 echo #define CRYPTOPP_INCLUDE_PREFIX ../cryptopp>>config.h
42 echo #define PACKAGE "amule">>config.h
43 echo #define HAVE_ERRNO_H>>config.h
44 echo #define HAVE_STRERROR>>config.h
45 echo #endif>>config.h