更改 qmake 的 OpenSSL 包含路径 [英] Changing OpenSSL include path for qmake

查看:47
本文介绍了更改 qmake 的 OpenSSL 包含路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 qmake 构建狗狗币.它不适用于 Fedora 的 OpenSSL,因为它的 OpenSSL 不包含椭圆曲线加密.所以我有自己的 OpenSSL,但我不知道如何更改 dogecoin-qt.pro 文件以包含来自不同位置的 OpenSSL.

I want to build Dogecoin with qmake. It doesn't work with Fedora's OpenSSL because its OpenSSL doesn't have elliptic curve cryptography included. So I've got my own OpenSSL but I can't figure out how to change the dogecoin-qt.pro file to include an OpenSSL from a different location.

通常使用 make 我会这样做:

Normally with make I would do this:

$ export OPENSSL_INCLUDE_PATH="/usr/local/ssl/include"
$ export OPENSSL_LIB_PATH="/usr/local/ssl/lib"

qmake 好像不一样了,我需要改的文件在这里:https://github.com/dogecoin/dogecoin/blob/master/dogecoin-qt.pro

qmake seems different, the file I need to change is here: https://github.com/dogecoin/dogecoin/blob/master/dogecoin-qt.pro

我该如何更改它,或者我可以给 qmake 提供什么论据,这样我就不必这样做了?

How do I change it, or what arguments can I give to qmake so I don't have to?

我已经编辑了它生成的 Makefile,但知道答案仍然很好,因为它会为其他人提供更好的构建说明.

I've edited the Makefile it generates but it would still be nice to know an answer because it will make nicer build instructions for other people.

推荐答案

您将不得不更改为 OpenSSL 库定义的变量

You will have to change variables defined for OpenSSL library

OPENSSL_INCLUDE_PATH=/usr/local/ssl/include
OPENSSL_LIB_PATH=/usr/local/ssl/lib

不幸的是,您还必须修复 Boost、BerkleyDB 和 miniUPNPc 的值,因为它们链接到特定于开发人员机器的位置.在类 Unix 系统上,最好使用 pkg-config 来获取库依赖项:

Unfortunately, you will also have to fix values for Boost, BerkleyDB and miniUPNPc as they link to a location specific for developer's machine. On Unix-like system it's better to use pkg-config to get library dependencies:

unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += boost 
}

而且看起来至少 miniupnpc 和 Berkley DB 没有任何 pkg-config 配置.

Also it looks like at least miniupnpc and Berkley DB don't have any pkg-config configuration.

这篇关于更改 qmake 的 OpenSSL 包含路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆