mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-07 07:22:15 +00:00
qmake: Use pkgconfig feature
Instead of using r2 to get the lib and include paths use the builtin qmake feature for pkgconfig. Still needs a tweak to work with sys/user.sh installations.
This commit is contained in:
parent
ec7f4c2e89
commit
c578629121
@ -8,27 +8,8 @@ win32 {
|
|||||||
} else {
|
} else {
|
||||||
LIBS += -L"$$PWD/../iaito_win32/radare2/lib64"
|
LIBS += -L"$$PWD/../iaito_win32/radare2/lib64"
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
# check if r2 is available
|
|
||||||
system(r2 > /dev/null 2>&1) {
|
|
||||||
|
|
||||||
# see https://github.com/hteso/iaito/pull/5#issuecomment-290433796
|
LIBS += \
|
||||||
RADARE2_INCLUDE_PATH = $$system(r2 -H | grep INCDIR | sed 's/[^=]*=//')
|
|
||||||
RADARE2_LIB_PATH = $$system(r2 -H | grep LIBDIR | sed 's/[^=]*=//')
|
|
||||||
|
|
||||||
!isEmpty(RADARE2_INCLUDE_PATH) {
|
|
||||||
INCLUDEPATH *= $$RADARE2_INCLUDE_PATH
|
|
||||||
LIBS *= -L$$RADARE2_LIB_PATH
|
|
||||||
} else {
|
|
||||||
error("sorry could not find radare2 lib")
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
error("r2 not found/in path")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LIBS += \
|
|
||||||
-lr_core \
|
-lr_core \
|
||||||
-lr_config \
|
-lr_config \
|
||||||
-lr_cons \
|
-lr_cons \
|
||||||
@ -52,4 +33,14 @@ LIBS += \
|
|||||||
-lr_fs \
|
-lr_fs \
|
||||||
-lr_magic \
|
-lr_magic \
|
||||||
-lr_crypto
|
-lr_crypto
|
||||||
|
} else {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG += link_pkgconfig
|
||||||
|
PKGCONFIG += r_core
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user