From 5d00897f27c4f3ce80a1b71edd90940931e1d1a6 Mon Sep 17 00:00:00 2001 From: tianduanrui <2407223896@qq.com> Date: Sat, 25 Nov 2017 20:32:09 +0800 Subject: [PATCH] update sdk position --- src/qqt.pro | 2 +- src/qqt_install.pri | 16 ++++++++-------- src/qqt_kit.pri | 2 ++ src/qqt_library.pri | 11 +++++------ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/qqt.pro b/src/qqt.pro index f2730caa..0d7684c8 100644 --- a/src/qqt.pro +++ b/src/qqt.pro @@ -78,7 +78,7 @@ QMAKE_CXXFLAGS += $${CLFLAGS} #QMAKE_POST_LINK won't work until source changed #qmake pro pri prf change won't effect to QMAKE_POST_LINK #but I need it before I complete this pri. -system("touch $${PWD}/widgets/qqtapplication.cpp") +system("touch $${PWD}/frame/qqtapplication.cpp") ################################################################# ##project Headers ################################################################# diff --git a/src/qqt_install.pri b/src/qqt_install.pri index b38b74c3..8b3e6618 100644 --- a/src/qqt_install.pri +++ b/src/qqt_install.pri @@ -134,7 +134,7 @@ defineTest(write_file) { defineReplace(create_dir_struct) { #if it's qt library, don't create command = - !equals(QQT_SDK_DIR , $$[QT_INSTALL_DATA]){ + !equals(QQT_SDK_PWD , $$[QT_INSTALL_DATA]){ !contains(QKIT_PRIVATE, macOS) { command += $$MK_DIR $$QQT_INC_DIR $$CMD_SEP } @@ -241,8 +241,8 @@ contains(CONFIG, qqt_create_sdk){ QQT_BUILD_DIR=$$OUT_PWD/bin #sdk path - QQT_SDK_DIR = $$PWD/../../sdk - message(QQt sdk install here:$${QQT_SDK_DIR}) + QQT_SDK_PWD = $${PWD}/../../$${QQT_STD_DIR} + message(QQt sdk install here:$${QQT_SDK_PWD}) QQT_INC_DIR = include/$${MODULE_NAME} QQT_LIB_DIR = lib @@ -251,9 +251,9 @@ contains(CONFIG, qqt_create_sdk){ QQT_PRI_FILEPATH=$${QQT_PRI_PATH}/qt_lib_$${module_name}.pri post_link = - post_link += $$RM_DIR $$QQT_SDK_DIR $$CMD_SEP - post_link += $$MK_DIR $$QQT_SDK_DIR $$CMD_SEP - post_link += $$CD $$QQT_SDK_DIR $$CMD_SEP + post_link += $$RM_DIR $$QQT_SDK_PWD $$CMD_SEP + post_link += $$MK_DIR $$QQT_SDK_PWD $$CMD_SEP + post_link += $$CD $$QQT_SDK_PWD $$CMD_SEP post_link += $$create_dir_struct() contains(QKIT_PRIVATE, macOS) { @@ -280,6 +280,6 @@ contains(CONFIG, install_to_qt_library){ MODULE_NAME=QQt QQT_BUILD_DIR=$$OUT_PWD/bin #sdk path - QQT_SDK_DIR=$$[QT_INSTALL_DATA] - message(QQt sdk install here:$${QQT_SDK_DIR}) + QQT_SDK_PWD=$$[QT_INSTALL_DATA] + message(QQt sdk install here:$${QQT_SDK_PWD}) } diff --git a/src/qqt_kit.pri b/src/qqt_kit.pri index 107b93d6..50207a6d 100644 --- a/src/qqt_kit.pri +++ b/src/qqt_kit.pri @@ -119,3 +119,5 @@ equals(QKIT_PRIVATE, EMBEDDED) { } message(Build $${TARGET} at $${QT_VERSION} $${SYSNAME} $${BUILD}) message(Build $${TARGET} on $${QMAKE_HOST.os}) + +QQT_STD_DIR = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD} diff --git a/src/qqt_library.pri b/src/qqt_library.pri index 59f95cf7..14943a2f 100644 --- a/src/qqt_library.pri +++ b/src/qqt_library.pri @@ -14,13 +14,12 @@ message(Link QQt to $${TARGET} $${QKIT_PRIVATE} \ at $${QT_VERSION} $${SYSNAME} $${BUILD} \ on $${QMAKE_HOST.os}) +#this configration need Qt Creator set default build directory +#%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name}")} contains(CONFIG, link_from_build) { - #this configration need Qt Creator set default build directory - #%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name}")} - QQT_BUILD_OUT_PWD = QQt/$${QT_VERSION}/$${SYSNAME}/$${BUILD}/src/$${DESTDIR} - QQT_LIB_PWD = $${QQT_BUILD_ROOT}/$${QQT_BUILD_OUT_PWD} + QQT_LIB_PWD = $${QQT_BUILD_ROOT}/$${QQT_STD_DIR}/src/$${DESTDIR} } else { - QQT_LIB_PWD = $$PWD/../../sdk/lib + QQT_LIB_PWD = $${PWD}/../../$${QQT_STD_DIR}/lib } message (Link QQt from: $$QQT_LIB_PWD) @@ -55,7 +54,7 @@ equals(QKIT_PRIVATE, macOS) { command += mkdir -p $$QQT_BUNDLE_VER_DIR $$CMD_SEP command += mkdir -p $$QQT_BUNDLE_INC_DIR $$CMD_SEP #copy lib - command += cp -rf $$QQT_LIB_PWD/$${MODULE_NAME}.framework/$${QQT_BUNDLE_VER_DIR}/* $$QQT_BUNDLE_VER_DIR $$CMD_SEP + command += cp -rf $${QQT_LIB_PWD}/$${MODULE_NAME}.framework/$${QQT_BUNDLE_VER_DIR}/* $$QQT_BUNDLE_VER_DIR $$CMD_SEP #link header current resources command += cd Versions $$CMD_SEP command += ln -sf $${QQT_MAJOR_VERSION} $${QQT_BUNDLE_CUR_LINK} $$CMD_SEP