forked from qt-creator/qt-creator
Fix Botan build with msvc
Change-Id: I516e9e4a3a267bcaf17038cd79298358d93d0ec0 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
committed by
Christian Kandeler
parent
6db2145b23
commit
882a51b75c
9
src/libs/3rdparty/botan/botan.cpp
vendored
9
src/libs/3rdparty/botan/botan.cpp
vendored
@@ -5,7 +5,8 @@
|
|||||||
* Distributed under the terms of the Botan license
|
* Distributed under the terms of the Botan license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include "botan.h"
|
||||||
|
#include <deque>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
@@ -13,12 +14,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "botan.h"
|
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include <deque>
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
namespace Botan {
|
namespace Botan {
|
||||||
|
|
||||||
|
8
src/libs/3rdparty/botan/botan.h
vendored
8
src/libs/3rdparty/botan/botan.h
vendored
@@ -8,6 +8,8 @@
|
|||||||
#ifndef BOTAN_AMALGAMATION_H__
|
#ifndef BOTAN_AMALGAMATION_H__
|
||||||
#define BOTAN_AMALGAMATION_H__
|
#define BOTAN_AMALGAMATION_H__
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
@@ -28,11 +30,7 @@
|
|||||||
#define BOTAN_DISTRIBUTION_INFO "unspecified"
|
#define BOTAN_DISTRIBUTION_INFO "unspecified"
|
||||||
|
|
||||||
#ifndef BOTAN_DLL
|
#ifndef BOTAN_DLL
|
||||||
#ifdef Q_OS_WIN
|
#define BOTAN_DLL Q_DECL_IMPORT
|
||||||
#define BOTAN_DLL __declspec(dllimport)
|
|
||||||
#else
|
|
||||||
#define BOTAN_DLL __attribute__((visibility("default")))
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Chunk sizes */
|
/* Chunk sizes */
|
||||||
|
3
src/libs/3rdparty/botan/botan.pro
vendored
3
src/libs/3rdparty/botan/botan.pro
vendored
@@ -11,6 +11,7 @@ DEPENDPATH += .
|
|||||||
INCLUDEPATH += .
|
INCLUDEPATH += .
|
||||||
unix:QMAKE_CXXFLAGS_DEBUG += -O2
|
unix:QMAKE_CXXFLAGS_DEBUG += -O2
|
||||||
|
|
||||||
|
DEFINES += BOTAN_DLL=Q_DECL_EXPORT
|
||||||
unix:DEFINES += BOTAN_TARGET_OS_HAS_GETTIMEOFDAY BOTAN_HAS_ALLOC_MMAP \
|
unix:DEFINES += BOTAN_TARGET_OS_HAS_GETTIMEOFDAY BOTAN_HAS_ALLOC_MMAP \
|
||||||
BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM BOTAN_HAS_ENTROPY_SRC_EGD BOTAN_HAS_ENTROPY_SRC_FTW \
|
BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM BOTAN_HAS_ENTROPY_SRC_EGD BOTAN_HAS_ENTROPY_SRC_FTW \
|
||||||
BOTAN_HAS_ENTROPY_SRC_UNIX BOTAN_HAS_MUTEX_PTHREAD BOTAN_HAS_PIPE_UNIXFD_IO
|
BOTAN_HAS_ENTROPY_SRC_UNIX BOTAN_HAS_MUTEX_PTHREAD BOTAN_HAS_PIPE_UNIXFD_IO
|
||||||
@@ -29,7 +30,7 @@ win32 {
|
|||||||
|
|
||||||
win32-msvc* {
|
win32-msvc* {
|
||||||
QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
|
QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
|
||||||
DEFINES += BOTAN_DLL=__declspec(dllexport) BOTAN_BUILD_COMPILER_IS_MSVC
|
DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC
|
||||||
} else {
|
} else {
|
||||||
QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long
|
QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long
|
||||||
QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long
|
QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long
|
||||||
|
6
src/libs/3rdparty/botan/botan.qbs
vendored
6
src/libs/3rdparty/botan/botan.qbs
vendored
@@ -20,9 +20,9 @@ QtcLibrary {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cpp.defines: {
|
cpp.defines: {
|
||||||
var result = []
|
var result = ["BOTAN_DLL=Q_DECL_EXPORT"]
|
||||||
if (qbs.toolchain == "msvc2005" || qbs.toolchain == "msvc2008" || qbs.toolchain == "msvc2010")
|
if (qbs.toolchain == "msvc")
|
||||||
result.push("BOTAN_DLL=__declspec(dllexport)", "BOTAN_BUILD_COMPILER_IS_MSVC")
|
result.push("BOTAN_BUILD_COMPILER_IS_MSVC")
|
||||||
if (qbs.toolchain == "gcc" || qbs.toolchain == "mingw")
|
if (qbs.toolchain == "gcc" || qbs.toolchain == "mingw")
|
||||||
result.push("BOTAN_BUILD_COMPILER_IS_GCC")
|
result.push("BOTAN_BUILD_COMPILER_IS_GCC")
|
||||||
if (qbs.targetOS == "linux")
|
if (qbs.targetOS == "linux")
|
||||||
|
Reference in New Issue
Block a user