From 54fe767e16ed69d788bc26ff3ccbf48a6843db62 Mon Sep 17 00:00:00 2001 From: newsages Date: Thu, 31 Mar 2016 15:15:55 +0200 Subject: [PATCH 1/3] Update limereport.pro --- limereport/limereport.pro | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/limereport/limereport.pro b/limereport/limereport.pro index 7fad193..c2c121f 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -27,13 +27,19 @@ include(limereport.pri) unix { DESTDIR = $${BUILD_DIR}/$${BUILD_TYPE}/lib - for(FILE,EXTRA_FILES){ - QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) + linux{ + for(FILE,EXTRA_FILES){ + QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # inside of libs make /include/files + } + QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ } -macx{ - QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) -} - QMAKE_POST_LINK += $(COPY_DIR) $$quote($${DEST_INCLUDE_DIR}*) $$quote($${DESTDIR}/include/) + macx{ + for(FILE,EXTRA_FILES){ + QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) + } + QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) + } + QMAKE_POST_LINK += $(COPY_DIR) $$quote($${DEST_INCLUDE_DIR}*) $$quote($${DESTDIR}/include) } win32 { From aeb11d03187b2c9b64b757204f47d0698df0af80 Mon Sep 17 00:00:00 2001 From: Newsages Date: Thu, 31 Mar 2016 15:30:00 +0200 Subject: [PATCH 2/3] not use end of / on $$VARIABLE_DIR for unix --- demo_r1/demo_r1.pro | 6 +++--- limereport/limereport.pro | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/demo_r1/demo_r1.pro b/demo_r1/demo_r1.pro index be82dd1..5591daf 100644 --- a/demo_r1/demo_r1.pro +++ b/demo_r1/demo_r1.pro @@ -26,7 +26,7 @@ DEPENDPATH += $$PWD/../include RESOURCES += \ r1.qrc -EXTRA_DIR += $$PWD/demo_reports/* +EXTRA_DIR += $$PWD/demo_reports DEST_DIR = $${BUILD_DIR}/$${BUILD_TYPE}/demo REPORTS_DIR = $${DEST_DIR}/demo_reports @@ -36,8 +36,8 @@ unix:{ LIBS += -L$${BUILD_DIR}/$${BUILD_TYPE}/lib -lQtZint } DESTDIR = $$DEST_DIR - QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | $$QMAKE_COPY_DIR $$quote($$EXTRA_DIR) $$quote($$REPORTS_DIR) $$escape_expand(\n\t) -!macx{ + QMAKE_POST_LINK += mkdir -p $$quote($$REPORTS_DIR) | $$QMAKE_COPY $$quote($$EXTRA_DIR)/* $$quote($$REPORTS_DIR) $$escape_expand(\n\t) +linux{ #Link share lib to ../lib rpath QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN QMAKE_LFLAGS += -Wl,--rpath=\\\$\$ORIGIN/lib diff --git a/limereport/limereport.pro b/limereport/limereport.pro index c2c121f..f2bf433 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -28,10 +28,11 @@ include(limereport.pri) unix { DESTDIR = $${BUILD_DIR}/$${BUILD_TYPE}/lib linux{ + QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ for(FILE,EXTRA_FILES){ QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # inside of libs make /include/files } - QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ + } macx{ for(FILE,EXTRA_FILES){ From 4665a7e914069a48191967f3d42cbf7d5e3d4c24 Mon Sep 17 00:00:00 2001 From: Newsages Date: Thu, 31 Mar 2016 15:42:08 +0200 Subject: [PATCH 3/3] DEST_INCLUDE_DIR = $$PWD/include/ to DEST_INCLUDE_DIR = $$PWD/include --- common.pri | 2 +- limereport/limereport.pro | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common.pri b/common.pri index 4799742..b9892f8 100644 --- a/common.pri +++ b/common.pri @@ -11,7 +11,7 @@ CONFIG(release, debug|release){ } BUILD_DIR = $$PWD/build/$${QT_VERSION} -DEST_INCLUDE_DIR = $$PWD/include/ +DEST_INCLUDE_DIR = $$PWD/include unix:!macx { ARCH_DIR = $${OUT_PWD}/unix diff --git a/limereport/limereport.pro b/limereport/limereport.pro index f2bf433..309a17a 100644 --- a/limereport/limereport.pro +++ b/limereport/limereport.pro @@ -25,12 +25,12 @@ EXTRA_FILES += \ include(limereport.pri) -unix { +unix:{ DESTDIR = $${BUILD_DIR}/$${BUILD_TYPE}/lib linux{ - QMAKE_POST_LINK += mkdir -p $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ + QMAKE_POST_LINK += mkdir -p $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # qmake need make mkdir -p on subdirs more than root/ for(FILE,EXTRA_FILES){ - QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DESTDIR}/include) $$escape_expand(\\n\\t) # inside of libs make /include/files + QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($${DEST_INCLUDE_DIR}) $$escape_expand(\\n\\t) # inside of libs make /include/files } }