diff --git a/.gitmodules b/.gitmodules index e5528448..1f026b0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,4 +4,4 @@ [submodule "radare2"] path = radare2 url = https://github.com/radare/radare2 - branch = f02064ccf481437f0ad420335f099be70b37a449 + branch = 902ce266e50ef40fc4018afe8a487e5437aad94d diff --git a/src/iaito.pro b/src/iaito.pro index 1f58d3eb..909869ed 100644 --- a/src/iaito.pro +++ b/src/iaito.pro @@ -4,12 +4,12 @@ TARGET = iaito # The application version win32 { - VERSION = 1.0 -# Generate debug symbols in release mode -QMAKE_CXXFLAGS_RELEASE += -Zi # Compiler -QMAKE_LFLAGS_RELEASE += /DEBUG # Linker + VERSION = 1.0 + # Generate debug symbols in release mode + QMAKE_CXXFLAGS_RELEASE += -Zi # Compiler + QMAKE_LFLAGS_RELEASE += /DEBUG # Linker } else { - VERSION = 1.0-dev + VERSION = 1.0-dev } ICON = img/Enso.icns @@ -29,6 +29,10 @@ macx { INCLUDEPATH *= . +unix:exists(/usr/local/include/libr) { + INCLUDEPATH += /usr/local/include/libr +} + SOURCES += \ main.cpp \ mainwindow.cpp \ diff --git a/src/lib_radare2.pri b/src/lib_radare2.pri index 73e7f34b..6f344b37 100644 --- a/src/lib_radare2.pri +++ b/src/lib_radare2.pri @@ -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 + } } - CONFIG += link_pkgconfig - PKGCONFIG += r_core + 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 + } } -