botan.pri 1.94 KB
Newer Older
Christian Kandeler's avatar
Christian Kandeler committed
1
INCLUDEPATH *= $$PWD/..
2
HEADERS += $$PWD/botan.h
3 4 5 6 7 8 9

equals(USE_SYSTEM_BOTAN, 1) {
    DEFINES += USE_SYSTEM_BOTAN
    CONFIG += link_pkgconfig
    PKGCONFIG += botan-1.10
} else {

10 11 12 13 14 15
SOURCES += $$PWD/botan.cpp

CONFIG += exceptions

DEPENDPATH += .

Orgad Shaneh's avatar
Orgad Shaneh committed
16
DEFINES += BOTAN_DLL=
17 18 19 20 21 22 23 24 25 26 27
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_UNIX BOTAN_HAS_MUTEX_PTHREAD BOTAN_HAS_PIPE_UNIXFD_IO
*linux*:DEFINES += BOTAN_TARGET_OS_IS_LINUX BOTAN_TARGET_OS_HAS_CLOCK_GETTIME \
    BOTAN_TARGET_OS_HAS_DLOPEN BOTAN_TARGET_OS_HAS_GMTIME_R BOTAN_TARGET_OS_HAS_POSIX_MLOCK \
    BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE BOTAN_HAS_DYNAMIC_LOADER
macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN
*g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC
*clang*:DEFINES += BOTAN_BUILD_COMPILER_IS_CLANG
*icc*:DEFINES += BOTAN_BUILD_COMPILER_IS_INTEL

28 29
CONFIG(x86_64):DEFINES += BOTAN_TARGET_ARCH_IS_X86_64

30 31 32 33 34 35 36 37 38
win32 {
    DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \
        BOTAN_TARGET_OS_HAS_LOADLIBRARY BOTAN_TARGET_OS_HAS_WIN32_GET_SYSTEMTIME \
        BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE \
        BOTAN_HAS_DYNAMIC_LOADER BOTAN_HAS_ENTROPY_SRC_CAPI BOTAN_HAS_ENTROPY_SRC_WIN32 \
        BOTAN_HAS_MUTEX_WIN32

    win32-msvc* {
        QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250
Orgad Shaneh's avatar
Orgad Shaneh committed
39
        DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC BOTAN_TARGET_OS_HAS_GMTIME_S _SCL_SECURE_NO_WARNINGS
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    } else {
        QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long
        QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long
    }
    LIBS += -ladvapi32 -luser32
}

unix:*-g++* {
    QMAKE_CFLAGS += -fPIC -ansi -fpermissive -finline-functions -Wno-long-long
    QMAKE_CXXFLAGS += -fPIC -ansi -fpermissive -finline-functions -Wno-long-long
    QMAKE_CXXFLAGS_HIDESYMS -= -fvisibility-inlines-hidden # for ubuntu 7.04
}

linux*|freebsd* {
    LIBS += -lrt
}
56
}