libzmq/builds/msvc/configure.bat
2016-05-03 10:18:46 +03:00

43 lines
1.3 KiB
Batchfile

@ECHO OFF
:- configure.bat creates platform.hpp and configures the build process
:- You MUST run this before building via msbuild or VisualStudio.
IF %1.==--help. (
ECHO Syntax: configure [ switch ]
ECHO --help show this help
GOTO END
)
ECHO Configuring libzmq...
ECHO // Generated by configure.bat> platform.hpp
ECHO. >> platform.hpp
ECHO #ifndef __PLATFORM_H_INCLUDED__>> platform.hpp
ECHO #define __PLATFORM_H_INCLUDED__>> platform.hpp
ECHO. >> platform.hpp
ECHO #define ZMQ_HAVE_WINDOWS 1>> platform.hpp
:- Check for dependencies
IF EXIST "..\..\..\libsodium" (
ECHO Building with libsodium
ECHO #define HAVE_LIBSODIUM 1>> platform.hpp
) ELSE (
ECHO Building without libsodium
ECHO #undef HAVE_LIBSODIUM>> platform.hpp
)
:- Check if we want to build the draft API
if "%1" == "--enable-drafts" goto :with_draft
if "%1" == "--disable-drafts" goto :no_draft
IF NOT EXIST "..\..\.git" GOTO no_draft
:with_draft
ECHO Building with draft API (stable + legacy + draft API)
ECHO // Provide draft classes and methods>>platform.hpp
ECHO #define ZMQ_BUILD_DRAFT_API 1>>platform.hpp
GOTO end_draft
:no_draft
ECHO Building without draft API (stable + legacy API)
ECHO #undef ZMQ_BUILD_DRAFT_API 1>>platform.hpp
:end_draft
ECHO. >> platform.hpp
ECHO #endif>> platform.hpp