From e135e3441cde7b2fd18ae5735feb172c599df224 Mon Sep 17 00:00:00 2001 From: AsamK Date: Mon, 31 Aug 2015 17:55:30 +0200 Subject: [PATCH] Create retroshare.pri for common configurations in .pro files So far it only contains the default values for installation paths --- RetroShare.pro | 7 ++----- libbitdht/src/libbitdht.pro | 2 ++ libresapi/src/libresapi.pro | 2 ++ libretroshare/src/libretroshare.pro | 7 ++----- openpgpsdk/src/openpgpsdk.pro | 2 ++ plugins/Common/retroshare_plugin.pri | 5 ++--- retroshare-gui/src/retroshare-gui.pro | 5 ++--- retroshare-nogui/src/retroshare-nogui.pro | 4 ++-- retroshare.pri | 6 ++++++ 9 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 retroshare.pri diff --git a/RetroShare.pro b/RetroShare.pro index b6df6e491..aaa1bbfde 100644 --- a/RetroShare.pro +++ b/RetroShare.pro @@ -1,3 +1,5 @@ +!include("retroshare.pri"): error("Could not include file retroshare.pri") + TEMPLATE = subdirs SUBDIRS += \ @@ -32,11 +34,6 @@ plugins.file = plugins/plugins.pro plugins.depends = retroshare_gui unix { - isEmpty(PREFIX) { PREFIX = /usr } - isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" } - isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" } - isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } - icon_files.path = "$${PREFIX}/share/icons/hicolor" icon_files.files = data/24x24 icon_files.files += data/48x48 diff --git a/libbitdht/src/libbitdht.pro b/libbitdht/src/libbitdht.pro index 6f705fa7d..ed576a700 100644 --- a/libbitdht/src/libbitdht.pro +++ b/libbitdht/src/libbitdht.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = lib CONFIG += staticlib CONFIG -= qt diff --git a/libresapi/src/libresapi.pro b/libresapi/src/libresapi.pro index a7a081701..cc12e1503 100644 --- a/libresapi/src/libresapi.pro +++ b/libresapi/src/libresapi.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = lib CONFIG += staticlib CONFIG -= qt diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index dca32bcd1..ba29fa605 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = lib CONFIG += staticlib bitdht CONFIG -= qt @@ -168,11 +170,6 @@ linux-* { } unix { - isEmpty(PREFIX) { PREFIX = /usr } - isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" } - isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" } - isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } - DEFINES *= LIB_DIR=\"\\\"$${LIB_DIR}\\\"\" DEFINES *= DATA_DIR=\"\\\"$${DATA_DIR}\\\"\" diff --git a/openpgpsdk/src/openpgpsdk.pro b/openpgpsdk/src/openpgpsdk.pro index c0f741857..786ee5819 100644 --- a/openpgpsdk/src/openpgpsdk.pro +++ b/openpgpsdk/src/openpgpsdk.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = lib win32 { CONFIG += staticlib diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri index e77626dc6..d20c1baa4 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = lib CONFIG *= plugin @@ -5,9 +7,6 @@ DEPENDPATH += ../../libretroshare/src/ ../../retroshare-gui/src/ INCLUDEPATH += ../../libretroshare/src/ ../../retroshare-gui/src/ unix { - isEmpty(PREFIX) { PREFIX = /usr } - isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" } - target.path = "$${LIB_DIR}/retroshare/extensions6" INSTALLS += target } diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 6e61a81e2..6632c871f 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + QT += network xml script CONFIG += qt gui uic qrc resources idle bitdht @@ -110,9 +112,6 @@ linux-* { } unix { - isEmpty(PREFIX) { PREFIX = /usr } - isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } - target.path = "$${PREFIX}/bin" INSTALLS += target diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro index 9d590efba..52dde1f02 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -1,3 +1,5 @@ +!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri") + TEMPLATE = app TARGET = RetroShare06-nogui CONFIG += bitdht @@ -56,8 +58,6 @@ linux-* { } unix { - isEmpty(PREFIX) { PREFIX = /usr } - target.path = "$${PREFIX}/bin" INSTALLS += target } diff --git a/retroshare.pri b/retroshare.pri new file mode 100644 index 000000000..fb20b1984 --- /dev/null +++ b/retroshare.pri @@ -0,0 +1,6 @@ +unix { + isEmpty(PREFIX) { PREFIX = "/usr" } + isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include/retroshare06" } + isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" } + isEmpty(DATA_DIR) { DATA_DIR = "$${PREFIX}/share/RetroShare06" } +}