Merge pull request #96 from AsamK/qmake_3

Qmake: Use PKGCONFIG and reduce duplicate code in .pro files
This commit is contained in:
Cyril Soler 2015-09-07 20:38:47 -04:00
commit da417eede9
11 changed files with 65 additions and 118 deletions

View File

@ -4,6 +4,8 @@ TEMPLATE = lib
CONFIG += staticlib CONFIG += staticlib
CONFIG -= qt CONFIG -= qt
TARGET = bitdht TARGET = bitdht
DESTDIR = lib
QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG
profiling { profiling {
@ -27,7 +29,6 @@ debug {
################################# Linux ########################################## ################################# Linux ##########################################
linux-* { linux-* {
DESTDIR = lib
QMAKE_CC = g++ QMAKE_CC = g++
} }
@ -50,7 +51,6 @@ unix {
win32-x-g++ { win32-x-g++ {
OBJECTS_DIR = temp/win32xgcc/obj OBJECTS_DIR = temp/win32xgcc/obj
DESTDIR = lib.win32xgcc
# These have been replaced by _WIN32 && __MINGW32__ # These have been replaced by _WIN32 && __MINGW32__
# DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU # DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
QMAKE_CXXFLAGS *= -Wmissing-include-dirs QMAKE_CXXFLAGS *= -Wmissing-include-dirs
@ -70,7 +70,6 @@ win32 {
DEFINES *= STATICLIB WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T DEFINES *= STATICLIB WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
# These have been replaced by _WIN32 && __MINGW32__ # These have been replaced by _WIN32 && __MINGW32__
#DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW #DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
DESTDIR = lib
# Switch on extra warnings # Switch on extra warnings
QMAKE_CFLAGS += -Wextra QMAKE_CFLAGS += -Wextra
@ -93,19 +92,16 @@ mac {
QMAKE_CC = g++ QMAKE_CC = g++
OBJECTS_DIR = temp/obj OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc MOC_DIR = temp/moc
DESTDIR = lib
} }
################################# FreeBSD ########################################## ################################# FreeBSD ##########################################
freebsd-* { freebsd-* {
DESTDIR = lib
} }
################################# OpenBSD ########################################## ################################# OpenBSD ##########################################
openbsd-* { openbsd-* {
DESTDIR = lib
} }
################################### COMMON stuff ################################## ################################### COMMON stuff ##################################
@ -168,5 +164,3 @@ SOURCES += \
bitdht/bdquerymgr.cc \ bitdht/bdquerymgr.cc \
util/bdbloom.cc \ util/bdbloom.cc \
bitdht/bdfriendlist.cc \ bitdht/bdfriendlist.cc \

View File

@ -2,8 +2,10 @@
TEMPLATE = lib TEMPLATE = lib
CONFIG += staticlib CONFIG += staticlib
CONFIG += create_prl
CONFIG -= qt CONFIG -= qt
TARGET = resapi TARGET = resapi
TARGET_PRL = libresapi
DESTDIR = lib DESTDIR = lib
CONFIG += libmicrohttpd CONFIG += libmicrohttpd
@ -26,6 +28,12 @@ win32{
} }
libmicrohttpd{ libmicrohttpd{
linux {
CONFIG += link_pkgconfig
PKGCONFIG *= libmicrohttpd
} else {
LIBS *= -lmicrohttpd
}
SOURCES += \ SOURCES += \
api/ApiServerMHD.cpp api/ApiServerMHD.cpp

View File

@ -6,6 +6,7 @@ CONFIG += create_prl
CONFIG -= qt CONFIG -= qt
TARGET = retroshare TARGET = retroshare
TARGET_PRL = libretroshare TARGET_PRL = libretroshare
DESTDIR = lib
#CONFIG += dsdv #CONFIG += dsdv
@ -72,15 +73,13 @@ SOURCES += tcponudp/udppeer.cc \
tcponudp/udpstunner.cc \ tcponudp/udpstunner.cc \
tcponudp/udprelay.cc \ tcponudp/udprelay.cc \
DEFINES *= RS_USE_BITDHT
BITDHT_DIR = ../../libbitdht/src BITDHT_DIR = ../../libbitdht/src
DEPENDPATH += . $${BITDHT_DIR} DEPENDPATH += . $${BITDHT_DIR}
INCLUDEPATH += . $${BITDHT_DIR} INCLUDEPATH += . $${BITDHT_DIR}
# The next line is for compliance with debian packages. Keep it! PRE_TARGETDEPS *= $${BITDHT_DIR}/lib/libbitdht.a
INCLUDEPATH += ../libbitdht LIBS *= $${BITDHT_DIR}/lib/libbitdht.a
DEFINES *= RS_USE_BITDHT
PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
LIBS += ../../libbitdht/src/lib/libbitdht.a
} }
@ -120,25 +119,14 @@ HEADERS += $$PUBLIC_HEADERS
################################# Linux ########################################## ################################# Linux ##########################################
linux-* { linux-* {
# These two lines fixe compilation on ubuntu natty. Probably a ubuntu packaging error. CONFIG += link_pkgconfig
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
OPENPGPSDK_DIR = ../../openpgpsdk/src
DEPENDPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
DESTDIR = lib
QMAKE_CXXFLAGS *= -Wall -D_FILE_OFFSET_BITS=64 QMAKE_CXXFLAGS *= -Wall -D_FILE_OFFSET_BITS=64
QMAKE_CC = g++ QMAKE_CC = g++
SSL_DIR = /usr/include/openssl
UPNP_DIR = /usr/include/upnp
DEPENDPATH += . $${SSL_DIR} $${UPNP_DIR}
INCLUDEPATH += . $${SSL_DIR} $${UPNP_DIR}
contains(CONFIG, NO_SQLCIPHER) { contains(CONFIG, NO_SQLCIPHER) {
DEFINES *= NO_SQLCIPHER DEFINES *= NO_SQLCIPHER
LIBS *= -lsqlite3 PKGCONFIG *= sqlite3
} else { } else {
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes) SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
isEmpty(SQLCIPHER_OK) { isEmpty(SQLCIPHER_OK) {
@ -151,19 +139,18 @@ linux-* {
error("libsqlcipher is not installed and libsqlcipher.a not found. SQLCIPHER is necessary for encrypted database, to build with unencrypted database, run: qmake CONFIG+=NO_SQLCIPHER") error("libsqlcipher is not installed and libsqlcipher.a not found. SQLCIPHER is necessary for encrypted database, to build with unencrypted database, run: qmake CONFIG+=NO_SQLCIPHER")
} }
} else { } else {
LIBS *= -lsqlcipher PKGCONFIG *= sqlcipher
} }
} }
#CONFIG += version_detail_bash_script #CONFIG += version_detail_bash_script
# linux/bsd can use either - libupnp is more complete and packaged. # linux/bsd can use either - libupnp is more complete and packaged.
#CONFIG += upnp_miniupnpc #CONFIG += upnp_miniupnpc
CONFIG += upnp_libupnp CONFIG += upnp_libupnp
# Check if the systems libupnp has been Debian-patched # Check if the systems libupnp has been Debian-patched
system(grep -E 'char[[:space:]]+PublisherUrl' $${UPNP_DIR}/upnp.h >/dev/null 2>&1) { system(grep -E 'char[[:space:]]+PublisherUrl' /usr/include/upnp/upnp.h >/dev/null 2>&1) {
# Normal libupnp # Normal libupnp
} else { } else {
# Patched libupnp or new unreleased version # Patched libupnp or new unreleased version
@ -171,14 +158,14 @@ linux-* {
} }
DEFINES *= UBUNTU DEFINES *= UBUNTU
INCLUDEPATH += /usr/include/glib-2.0/ /usr/lib/glib-2.0/include PKGCONFIG *= gnome-keyring-1
LIBS *= -lgnome-keyring PKGCONFIG *= libssl libupnp
LIBS *= -lssl -lupnp -lixml PKGCONFIG *= libcrypto zlib
LIBS *= -lcrypto -lz -lpthread LIBS *= -lpthread -ldl
} }
unix { unix {
DEFINES *= LIB_DIR=\"\\\"$${LIB_DIR}\\\"\" DEFINES *= PLUGIN_DIR=\"\\\"$${PLUGIN_DIR}\\\"\"
DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\" DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\"
## where to put the librarys interface ## where to put the librarys interface
@ -216,7 +203,6 @@ version_detail_bash_script {
win32-x-g++ { win32-x-g++ {
OBJECTS_DIR = temp/win32xgcc/obj OBJECTS_DIR = temp/win32xgcc/obj
DESTDIR = lib.win32xgcc
DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU DEFINES *= WINDOWS_SYS WIN32 WIN_CROSS_UBUNTU
QMAKE_CXXFLAGS *= -Wmissing-include-dirs QMAKE_CXXFLAGS *= -Wmissing-include-dirs
QMAKE_CC = i586-mingw32msvc-g++ QMAKE_CC = i586-mingw32msvc-g++
@ -243,7 +229,6 @@ win32 {
DEFINES *= MINIUPNPC_VERSION=13 DEFINES *= MINIUPNPC_VERSION=13
# This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP) # This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP)
DEFINES *= WINVER=0x0501 DEFINES *= WINVER=0x0501
DESTDIR = lib
# Switch on extra warnings # Switch on extra warnings
QMAKE_CFLAGS += -Wextra QMAKE_CFLAGS += -Wextra
@ -266,10 +251,9 @@ win32 {
LIBS += -lsqlcipher LIBS += -lsqlcipher
LIBS_DIR = $$PWD/../../../libs LIBS_DIR = $$PWD/../../../libs
OPENPGPSDK_DIR = $$PWD/../../openpgpsdk/src
DEPENDPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc $$OPENPGPSDK_DIR DEPENDPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc $$OPENPGPSDK_DIR INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
} }
################################# MacOSX ########################################## ################################# MacOSX ##########################################
@ -280,7 +264,6 @@ mac {
MOC_DIR = temp/moc MOC_DIR = temp/moc
#DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW #DEFINES = WINDOWS_SYS WIN32 STATICLIB MINGW
#DEFINES *= MINIUPNPC_VERSION=13 #DEFINES *= MINIUPNPC_VERSION=13
DESTDIR = lib
CONFIG += upnp_miniupnpc CONFIG += upnp_miniupnpc
@ -295,13 +278,13 @@ mac {
#GPG_ERROR_DIR = ../../../../libgpg-error-1.7 #GPG_ERROR_DIR = ../../../../libgpg-error-1.7
#GPGME_DIR = ../../../../gpgme-1.1.8 #GPGME_DIR = ../../../../gpgme-1.1.8
OPENPGPSDK_DIR = ../../openpgpsdk/src
INCLUDEPATH += . $${UPNPC_DIR} INCLUDEPATH += . $${UPNPC_DIR}
INCLUDEPATH += $${OPENPGPSDK_DIR}
#../openpgpsdk
#INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src #INCLUDEPATH += . $${UPNPC_DIR} $${GPGME_DIR}/src $${GPG_ERROR_DIR}/src
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
LIBS += ../../../lib/libsqlcipher.a
#LIBS += -lsqlite3
} }
################################# FreeBSD ########################################## ################################# FreeBSD ##########################################
@ -315,8 +298,6 @@ freebsd-* {
# linux/bsd can use either - libupnp is more complete and packaged. # linux/bsd can use either - libupnp is more complete and packaged.
#CONFIG += upnp_miniupnpc #CONFIG += upnp_miniupnpc
CONFIG += upnp_libupnp CONFIG += upnp_libupnp
DESTDIR = lib
} }
################################# OpenBSD ########################################## ################################# OpenBSD ##########################################
@ -325,21 +306,19 @@ openbsd-* {
INCLUDEPATH *= /usr/local/include INCLUDEPATH *= /usr/local/include
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g") INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
OPENPGPSDK_DIR = ../../openpgpsdk/src
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
CONFIG += upnp_libupnp CONFIG += upnp_libupnp
DESTDIR = lib
} }
################################### COMMON stuff ################################## ################################### COMMON stuff ##################################
# openpgpsdk # openpgpsdk
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a OPENPGPSDK_DIR = ../../openpgpsdk/src
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2 DEPENDPATH *= $${OPENPGPSDK_DIR}
INCLUDEPATH *= $${OPENPGPSDK_DIR}
PRE_TARGETDEPS *= $${OPENPGPSDK_DIR}/lib/libops.a
LIBS *= $${OPENPGPSDK_DIR}/lib/libops.a -lbz2
HEADERS += dbase/cachestrapper.h \ HEADERS += dbase/cachestrapper.h \
dbase/fimonitor.h \ dbase/fimonitor.h \

View File

@ -1251,7 +1251,7 @@ int RsServer::StartupRetroShare()
std::vector<std::string> plugins_directories ; std::vector<std::string> plugins_directories ;
#ifndef WINDOWS_SYS #ifndef WINDOWS_SYS
plugins_directories.push_back(std::string(LIB_DIR) + "/retroshare/extensions6/") ; plugins_directories.push_back(std::string(PLUGIN_DIR)) ;
#endif #endif
std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ; std::string extensions_dir = rsAccounts->PathBaseDirectory() + "/extensions6/" ;
plugins_directories.push_back(extensions_dir) ; plugins_directories.push_back(extensions_dir) ;

View File

@ -7,7 +7,7 @@ DEPENDPATH += ../../libretroshare/src/ ../../retroshare-gui/src/
INCLUDEPATH += ../../libretroshare/src/ ../../retroshare-gui/src/ INCLUDEPATH += ../../libretroshare/src/ ../../retroshare-gui/src/
unix { unix {
target.path = "$${LIB_DIR}/retroshare/extensions6" target.path = "$${PLUGIN_DIR}"
INSTALLS += target INSTALLS += target
} }

View File

@ -81,12 +81,9 @@ TRANSLATIONS += \
lang/FeedReader_zh_CN.ts lang/FeedReader_zh_CN.ts
linux-* { linux-* {
LIBXML2_DIR = /usr/include/libxml2 CONFIG += link_pkgconfig
DEPENDPATH += $${LIBXML2_DIR} PKGCONFIG *= libcurl libxml-2.0 libxslt
INCLUDEPATH += $${LIBXML2_DIR}
LIBS += -lcurl -lxml2 -lxslt
} }
win32 { win32 {
@ -102,4 +99,3 @@ openbsd-* {
LIBS += -lcurl -lxml2 -lxslt LIBS += -lcurl -lxml2 -lxslt
} }

View File

@ -21,10 +21,11 @@ INCLUDEPATH += ../../retroshare-gui/src/temp/ui ../../libretroshare/src
linux-* { linux-* {
CONFIG += link_pkgconfig CONFIG += link_pkgconfig
# Necessary for openSUSE
PKGCONFIG += libavcodec libavutil PKGCONFIG += libavcodec libavutil
PKGCONFIG += speex speexdsp
PKGCONFIG += opencv PKGCONFIG += opencv
} else {
LIBS += -lspeex -lspeexdsp -lavcodec -lavutil
} }
win32 { win32 {
@ -103,5 +104,3 @@ TRANSLATIONS += \
lang/VOIP_sv.ts \ lang/VOIP_sv.ts \
lang/VOIP_tr.ts \ lang/VOIP_tr.ts \
lang/VOIP_zh_CN.ts lang/VOIP_zh_CN.ts
LIBS += -lspeex -lspeexdsp -lavcodec -lavutil

View File

@ -1,8 +1,10 @@
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") !include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = app
QT += network xml QT += network xml
CONFIG += qt gui uic qrc resources idle bitdht CONFIG += qt gui uic qrc resources idle bitdht
CONFIG += link_prl CONFIG += link_prl
TARGET = RetroShare06
# Plz never commit the .pro with these flags enabled. # Plz never commit the .pro with these flags enabled.
# Use this flag when developping new features only. # Use this flag when developping new features only.
@ -34,9 +36,6 @@ CONFIG += gxsgui
#CONFIG += framecatcher #CONFIG += framecatcher
#CONFIG += blogs #CONFIG += blogs
TEMPLATE = app
TARGET = RetroShare06
DEFINES += RS_RELEASE_VERSION DEFINES += RS_RELEASE_VERSION
RCC_DIR = temp/qrc RCC_DIR = temp/qrc
UI_DIR = temp/ui UI_DIR = temp/ui
@ -61,15 +60,13 @@ INCLUDEPATH *= retroshare-gui
################################# Linux ########################################## ################################# Linux ##########################################
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib # Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
linux-* { linux-* {
CONFIG += link_pkgconfig
#CONFIG += version_detail_bash_script #CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a PKGCONFIG *= x11 xscrnsaver
LIBS += ../../libretroshare/src/lib/libretroshare.a LIBS *= -rdynamic
LIBS *= -lX11 -lXss
LIBS *= -rdynamic -ldl
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
DEFINES *= UBUNTU DEFINES *= UBUNTU
} }
@ -130,7 +127,6 @@ version_detail_bash_script {
win32-x-g++ { win32-x-g++ {
OBJECTS_DIR = temp/win32-x-g++/obj OBJECTS_DIR = temp/win32-x-g++/obj
LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a
LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a
@ -178,11 +174,8 @@ win32 {
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats" #LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
#QTPLUGIN += qjpeg #QTPLUGIN += qjpeg
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS_DIR = $$PWD/../../../libs LIBS_DIR = $$PWD/../../../libs
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -L"$$LIBS_DIR/lib" LIBS += -L"$$LIBS_DIR/lib"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32 LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
@ -221,16 +214,12 @@ macx {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
CONFIG += version_detail_bash_script CONFIG += version_detail_bash_script
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -lssl -lcrypto -lz LIBS += -lssl -lcrypto -lz
#LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan #LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
LIBS += -framework Security LIBS += -framework Security
LIBS += ../../../lib/libsqlcipher.a
#LIBS += -lsqlite3
INCLUDEPATH += . INCLUDEPATH += .
#DEFINES* = MAC_IDLE # for idle feature #DEFINES* = MAC_IDLE # for idle feature
CONFIG -= uitools CONFIG -= uitools
@ -240,12 +229,10 @@ macx {
freebsd-* { freebsd-* {
INCLUDEPATH *= /usr/local/include/gpgme INCLUDEPATH *= /usr/local/include/gpgme
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl LIBS *= -lssl
LIBS *= -lgpgme LIBS *= -lgpgme
LIBS *= -lupnp LIBS *= -lupnp
LIBS *= -lgnome-keyring LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS += -lsqlite3 LIBS += -lsqlite3
} }
@ -255,17 +242,11 @@ freebsd-* {
openbsd-* { openbsd-* {
INCLUDEPATH *= /usr/local/include INCLUDEPATH *= /usr/local/include
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl -lcrypto LIBS *= -lssl -lcrypto
LIBS *= -lgpgme LIBS *= -lgpgme
LIBS *= -lupnp LIBS *= -lupnp
LIBS *= -lgnome-keyring LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS += -lsqlite3 LIBS += -lsqlite3
LIBS *= -rdynamic LIBS *= -rdynamic
} }
@ -281,15 +262,19 @@ openbsd-* {
DEPENDPATH += . ../../libretroshare/src/ DEPENDPATH += . ../../libretroshare/src/
INCLUDEPATH += ../../libretroshare/src/ INCLUDEPATH += ../../libretroshare/src/
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
wikipoos { wikipoos {
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a PRE_TARGETDEPS *= ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
LIBS *= ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
} }
# webinterface # webinterface
DEPENDPATH += ../../libresapi/src DEPENDPATH += ../../libresapi/src
INCLUDEPATH += ../../libresapi/src INCLUDEPATH += ../../libresapi/src
PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a
LIBS += ../../libresapi/src/lib/libresapi.a -lmicrohttpd LIBS += ../../libresapi/src/lib/libresapi.a
# Input # Input
HEADERS += rshare.h \ HEADERS += rshare.h \

View File

@ -26,8 +26,7 @@ linux-* {
#CONFIG += version_detail_bash_script #CONFIG += version_detail_bash_script
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64 QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
LIBS += ../../libretroshare/src/lib/libretroshare.a LIBS *= -rdynamic
LIBS *= -rdynamic -ldl
} }
unix { unix {
@ -48,7 +47,6 @@ linux-g++-64 {
win32-x-g++ { win32-x-g++ {
OBJECTS_DIR = temp/win32-x-g++/obj OBJECTS_DIR = temp/win32-x-g++/obj
LIBS += ../../../../lib/win32-x-g++/libretroshare.a
LIBS += ../../../../lib/win32-x-g++/libssl.a LIBS += ../../../../lib/win32-x-g++/libssl.a
LIBS += ../../../../lib/win32-x-g++/libcrypto.a LIBS += ../../../../lib/win32-x-g++/libcrypto.a
LIBS += ../../../../lib/win32-x-g++/libminiupnpc.a LIBS += ../../../../lib/win32-x-g++/libminiupnpc.a
@ -74,11 +72,8 @@ win32 {
# solve linker warnings because of the order of the libraries # solve linker warnings because of the order of the libraries
QMAKE_LFLAGS += -Wl,--start-group QMAKE_LFLAGS += -Wl,--start-group
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS_DIR = $$PWD/../../../libs LIBS_DIR = $$PWD/../../../libs
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -L"$$LIBS_DIR/lib" LIBS += -L"$$LIBS_DIR/lib"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz
LIBS += -lcrypto -lws2_32 -lgdi32 LIBS += -lcrypto -lws2_32 -lgdi32
@ -102,18 +97,11 @@ macx {
# CONFIG += ppc x86 # CONFIG += ppc x86
LIBS += -Wl,-search_paths_first LIBS += -Wl,-search_paths_first
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -lssl -lcrypto -lz LIBS += -lssl -lcrypto -lz
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
LIBS += -framework CoreFoundation LIBS += -framework CoreFoundation
LIBS += -framework Security LIBS += -framework Security
gxs {
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
# LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
LIBS += ../../../lib/libsqlcipher.a
}
sshserver { sshserver {
LIBS += -L../../../lib LIBS += -L../../../lib
#LIBS += -L../../../lib/libssh-0.6.0 #LIBS += -L../../../lib/libssh-0.6.0
@ -127,12 +115,10 @@ macx {
freebsd-* { freebsd-* {
INCLUDEPATH *= /usr/local/include/gpgme INCLUDEPATH *= /usr/local/include/gpgme
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl LIBS *= -lssl
LIBS *= -lgpgme LIBS *= -lgpgme
LIBS *= -lupnp LIBS *= -lupnp
LIBS *= -lgnome-keyring LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
} }
##################################### OpenBSD ###################################### ##################################### OpenBSD ######################################
@ -140,12 +126,10 @@ freebsd-* {
openbsd-* { openbsd-* {
INCLUDEPATH *= /usr/local/include INCLUDEPATH *= /usr/local/include
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
LIBS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -lssl -lcrypto LIBS *= -lssl -lcrypto
LIBS *= -lgpgme LIBS *= -lgpgme
LIBS *= -lupnp LIBS *= -lupnp
LIBS *= -lgnome-keyring LIBS *= -lgnome-keyring
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= -rdynamic LIBS *= -rdynamic
} }
@ -155,6 +139,9 @@ openbsd-* {
DEPENDPATH += . ../../libretroshare/src DEPENDPATH += . ../../libretroshare/src
INCLUDEPATH += . ../../libretroshare/src INCLUDEPATH += . ../../libretroshare/src
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
LIBS *= ../../libretroshare/src/lib/libretroshare.a
# Input # Input
HEADERS += notifytxt.h HEADERS += notifytxt.h
SOURCES += notifytxt.cc \ SOURCES += notifytxt.cc \
@ -169,7 +156,7 @@ introserver {
webui { webui {
DEFINES *= ENABLE_WEBUI DEFINES *= ENABLE_WEBUI
PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a PRE_TARGETDEPS *= ../../libresapi/src/lib/libresapi.a
LIBS += ../../libresapi/src/lib/libresapi.a -lmicrohttpd LIBS += ../../libresapi/src/lib/libresapi.a
DEPENDPATH += ../../libresapi/src DEPENDPATH += ../../libresapi/src
INCLUDEPATH += ../../libresapi/src INCLUDEPATH += ../../libresapi/src
HEADERS += \ HEADERS += \

View File

@ -7,6 +7,7 @@ unix {
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" } isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" }
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" } isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" }
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" }
} }
unfinished { unfinished {

View File

@ -3,6 +3,7 @@ CONFIG += staticlib
CONFIG += create_prl CONFIG += create_prl
CONFIG -= qt CONFIG -= qt
TARGET = pegmarkdown TARGET = pegmarkdown
DESTDIR = lib
QMAKE_CFLAGS *= -Wall -ansi -D_GNU_SOURCE QMAKE_CFLAGS *= -Wall -ansi -D_GNU_SOURCE
QMAKE_CC = gcc QMAKE_CC = gcc
@ -15,8 +16,9 @@ debug {
################################# Linux ########################################## ################################# Linux ##########################################
linux-* { linux-* {
DESTDIR = lib CONFIG += link_pkgconfig
LIBS *= -lglib-2.0
PKGCONFIG *= glib-2.0
} }
linux-g++ { linux-g++ {
@ -32,7 +34,6 @@ linux-g++-64 {
win32 { win32 {
OBJECTS_DIR = temp/obj OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc MOC_DIR = temp/moc
DESTDIR = lib
# Switch on extra warnings # Switch on extra warnings
QMAKE_CFLAGS += -Wextra QMAKE_CFLAGS += -Wextra
@ -55,7 +56,6 @@ win32 {
mac { mac {
OBJECTS_DIR = temp/obj OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc MOC_DIR = temp/moc
DESTDIR = lib
CONFIG += dummy_glib CONFIG += dummy_glib
} }
@ -63,13 +63,11 @@ mac {
################################# FreeBSD ########################################## ################################# FreeBSD ##########################################
freebsd-* { freebsd-* {
DESTDIR = lib
} }
################################# OpenBSD ########################################## ################################# OpenBSD ##########################################
openbsd-* { openbsd-* {
DESTDIR = lib
} }
################################### COMMON stuff ################################## ################################### COMMON stuff ##################################