fix library

This commit is contained in:
Andrei Yankovich 2019-07-07 18:37:20 +03:00
parent 15c066cae4
commit 9601b21682
6 changed files with 68 additions and 6 deletions

21
GMP.pri
View File

@ -0,0 +1,21 @@
#
# Copyright (C) 2018-2019 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
!isEmpty(Qt_GMP_LIB):error("GMP.pri already included")
Qt_GMP_LIB = 1
#DEPENDS
CONFIG(release, debug|release): {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/release"
} else {
MINIGMP_LIBRARY_OUTPUT_DIR="$$PWD/build/debug"
}
unix:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
win32:LIBS += -L$$MINIGMP_LIBRARY_OUTPUT_DIR -lminigmp
INCLUDEPATH += "$$PWD"

18
GMP.pro
View File

@ -1,3 +1,11 @@
#
# Copyright (C) 2018-2019 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
QT -= core gui QT -= core gui
TARGET = MiniGMP TARGET = MiniGMP
@ -6,11 +14,17 @@ TEMPLATE = lib
DEFINES += MINIGMP_LIBRARY DEFINES += MINIGMP_LIBRARY
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
VERSION = 6.0.0 VERSION = 6.1.2
TARGET = minigmp
CONFIG(release, debug|release): {
DESTDIR="$$PWD/build/release"
} else {
DESTDIR="$$PWD/build/debug"
}
DISTFILES += \ DISTFILES += \
README \ README \
gen_export.sh
HEADERS += \ HEADERS += \
bigint.h \ bigint.h \

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.9.2, 2019-07-07T14:13:43. --> <!-- Written by QtCreator 4.9.2, 2019-07-07T18:29:33. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

View File

@ -1,3 +1,10 @@
//#
//# Copyright (C) 2018-2019 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include "bigint.h" #include "bigint.h"
BigInt::BigInt() { BigInt::BigInt() {

View File

@ -1,14 +1,23 @@
//#
//# Copyright (C) 2018-2019 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#ifndef BIGINT_H #ifndef BIGINT_H
#define BIGINT_H #define BIGINT_H
#include "mini-gmp.h" #include "mini-gmp.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include "minigmp_global.h"
/** /**
* @brief The BigInt class - c++ minigmp wrapper * @brief The BigInt class - c++ minigmp wrapper
*/ */
class BigInt class UNTITLEDSHARED_EXPORT BigInt
{ {
mpz_t data; mpz_t data;
public: public:

View File

@ -1,10 +1,21 @@
//#
//# Copyright (C) 2018-2019 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#ifndef MINIGMP_GLOBAL_H #ifndef MINIGMP_GLOBAL_H
#define MINIGMP_GLOBAL_H #define MINIGMP_GLOBAL_H
#if defined(MINIGMP_LIBRARY) #ifdef _WIN32
# define UNTITLEDSHARED_EXPORT __declspec(dllexport) # define UNTITLEDSHARED_EXPORT __declspec(dllexport)
#else #endif
#ifdef linux
# define UNTITLEDSHARED_EXPORT __attribute__((visibility("default"))) # define UNTITLEDSHARED_EXPORT __attribute__((visibility("default")))
#endif #endif
#endif //MINIGMP_GLOBAL_H #endif //MINIGMP_GLOBAL_H