patch from Henry Morgan to auto-detect system-wide libssh and use it to compile

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6169 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-02-28 22:48:28 +00:00
parent 4cf53ba03e
commit 2752a6975d

View File

@ -171,9 +171,24 @@ sshserver {
LIBS += -lssh LIBS += -lssh
LIBS += -lssh_threads LIBS += -lssh_threads
} else { } else {
LIBS += $$LIBSSH_DIR/build/src/libssh.a SSH_OK = $$system(pkg-config --atleast-version 0.5.2 libssh && echo yes)
LIBS += $$LIBSSH_DIR/build/src/threads/libssh_threads.a isEmpty(SSH_OK) {
} exists($$LIBSSH_DIR/build/src/libssh.a):exists($$LIBSSH_DIR/build/src/threads/libssh_threads.a) {
LIBS += $$LIBSSH_DIR/build/src/libssh.a
LIBS += $$LIBSSH_DIR/build/src/threads/libssh_threads.a
}
else {
! exists($$LIBSSH_DIR/build/src/libssh.a):message($$LIBSSH_DIR/build/src/libssh.a does not exist)
! exists($$LIBSSH_DIR/build/src/threads/libssh_threads.a):message($$LIBSSH_DIR/build/src/threads/libssh_threads.a does not exist)
message(You need to download and compile libssh)
message(See http://sourceforge.net/p/retroshare/code/6163/tree/trunk/)
error(Please fix this and try again. Will stop now.)
}
} else {
LIBS += -lssh
LIBS += -lssh_threads
}
}
HEADERS += ssh/rssshd.h HEADERS += ssh/rssshd.h
SOURCES += ssh/rssshd.cc SOURCES += ssh/rssshd.cc