From da2c4770fc2bf264b8c558483cee75d7c53af8b2 Mon Sep 17 00:00:00 2001 From: mauronz Date: Tue, 19 Jun 2018 16:16:22 +0200 Subject: [PATCH] Fix references to pkg-config in lib_radare2.pri for Unix (#540) * Fix references to pkg-config in lib_radare2.pri for Unix --- src/lib_radare2.pri | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/lib_radare2.pri b/src/lib_radare2.pri index 17543765..98224069 100644 --- a/src/lib_radare2.pri +++ b/src/lib_radare2.pri @@ -35,16 +35,29 @@ win32 { -lr_crypto \ -lr_shlr } else { + macx { + PREFIX=/usr/local + } else { + PREFIX=/usr + } USE_PKGCONFIG = 1 R2_USER_PKGCONFIG = $$(HOME)/bin/prefix/radare2/lib/pkgconfig exists($$R2_USER_PKGCONFIG) { # caution: may not work for cross compilations - QMAKE_PKG_CONFIG = PKG_CONFIG_PATH=$$R2_USER_PKGCONFIG pkg-config + PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$R2_USER_PKGCONFIG } else { - exists(/usr/local/lib/pkgconfig/r_core.pc) { - QMAKE_PKG_CONFIG = PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config - LIBS += -L/usr/local/lib - INCLUDEPATH += /usr/local/include/libr + unix { + exists($$PREFIX/lib/pkgconfig/r_core.pc) { + PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:$$PREFIX/lib/pkgconfig + } else { + LIBS += -L$$PREFIX/lib + INCLUDEPATH += $$PREFIX/include/libr + USE_PKGCONFIG = 0 + } + } + macx { + LIBS += -L$$PREFIX/lib + INCLUDEPATH += $$PREFIX/include/libr USE_PKGCONFIG = 0 } }