Fix build with QT Creator (#193)

* Fix build with QT Creator
* Only clobber includes on unix
* Update r2 submodule
This commit is contained in:
Sergi Àlvarez i Capilla 2017-08-31 19:51:45 +02:00 committed by radare
parent 142f0941c4
commit 3a1d27a67f
3 changed files with 49 additions and 9 deletions

2
.gitmodules vendored
View File

@ -4,4 +4,4 @@
[submodule "radare2"]
path = radare2
url = https://github.com/radare/radare2
branch = f02064ccf481437f0ad420335f099be70b37a449
branch = 902ce266e50ef40fc4018afe8a487e5437aad94d

View File

@ -29,6 +29,10 @@ macx {
INCLUDEPATH *= .
unix:exists(/usr/local/include/libr) {
INCLUDEPATH += /usr/local/include/libr
}
SOURCES += \
main.cpp \
mainwindow.cpp \

View File

@ -34,13 +34,49 @@ win32 {
-lr_magic \
-lr_crypto
} else {
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
} 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
USE_PKGCONFIG = 0
}
}
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
DEFINES += _CRT_SECURE_NO_WARNINGS
USE_PKGCONFIG {
CONFIG += link_pkgconfig
PKGCONFIG += r_core
} else {
LIBS += \
-lr_core \
-lr_config \
-lr_cons \
-lr_io \
-lr_flag \
-lr_asm \
-lr_debug \
-lr_hash \
-lr_bin \
-lr_lang \
-lr_io \
-lr_parse \
-lr_bp \
-lr_egg \
-lr_reg \
-lr_search \
-lr_syscall \
-lr_socket \
-lr_fs \
-lr_anal \
-lr_magic \
-lr_util \
-lr_crypto
}
}