From dc84031b4b645cd3a1685a71cb1972ccf2ada9dd Mon Sep 17 00:00:00 2001 From: Nissim Bendanan Date: Wed, 10 May 2023 13:02:30 +0300 Subject: [PATCH 1/3] linuxdeployqt: add option in cmake to NOT update excludelist can use cmake -DWORK_OFFLINE=ON to avoid updating excludelist from Internet --- tools/linuxdeployqt/CMakeLists.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tools/linuxdeployqt/CMakeLists.txt b/tools/linuxdeployqt/CMakeLists.txt index e4b68927..65027bd2 100644 --- a/tools/linuxdeployqt/CMakeLists.txt +++ b/tools/linuxdeployqt/CMakeLists.txt @@ -11,18 +11,21 @@ add_definitions("-DBUILD_NUMBER=\"${BUILD_NUMBER}\"") find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) -# update excludelist -message(STATUS "Updating excludelist...") -execute_process( - COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/../generate-excludelist.sh - OUTPUT_VARIABLE EXCLUDELIST - TIMEOUT 10 - RESULT_VARIABLE EXCLUDELIST_RESULT -) -if(NOT EXCLUDELIST_RESULT EQUAL 0) - message(WARNING "Updating excludelist failed, using outdated copy") -endif() -mark_as_advanced(EXCLUDELIST EXCLUDELIST_RESULT) +option(WORK_OFFLINE "work offline" OFF) +IF(NOT WORK_OFFLINE) + # update excludelist + message(STATUS "Updating excludelist...") + execute_process( + COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/../generate-excludelist.sh + OUTPUT_VARIABLE EXCLUDELIST + TIMEOUT 10 + RESULT_VARIABLE EXCLUDELIST_RESULT + ) + if(NOT EXCLUDELIST_RESULT EQUAL 0) + message(WARNING "Updating excludelist failed, using outdated copy") + endif() + mark_as_advanced(EXCLUDELIST EXCLUDELIST_RESULT) +ENDIF() add_executable(linuxdeployqt main.cpp shared.cpp) target_include_directories(linuxdeployqt PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) From b8b6a3ede5a731c5e10c6677021b33f9bb2cefd8 Mon Sep 17 00:00:00 2001 From: Nissim Bendanan Date: Wed, 5 Jul 2023 15:12:38 +0300 Subject: [PATCH 2/3] updating excludelist opt-in --- tools/linuxdeployqt/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/linuxdeployqt/CMakeLists.txt b/tools/linuxdeployqt/CMakeLists.txt index 65027bd2..b4d4e3d1 100644 --- a/tools/linuxdeployqt/CMakeLists.txt +++ b/tools/linuxdeployqt/CMakeLists.txt @@ -11,8 +11,8 @@ add_definitions("-DBUILD_NUMBER=\"${BUILD_NUMBER}\"") find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) -option(WORK_OFFLINE "work offline" OFF) -IF(NOT WORK_OFFLINE) +option(UPGRADE_EXCLUDELIST_ONLINE "Updating excludelist online" ON) +IF(UPGRADE_EXCLUDELIST_ONLINE) # update excludelist message(STATUS "Updating excludelist...") execute_process( From a0a4fdeba14e26e16515b5dab3437bd32ec025c9 Mon Sep 17 00:00:00 2001 From: Nissim Bendanan Date: Wed, 10 May 2023 13:03:17 +0300 Subject: [PATCH 3/3] linuxdeployqt: fix find package for Qt (and not QT) --- tools/linuxdeployqt/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/linuxdeployqt/CMakeLists.txt b/tools/linuxdeployqt/CMakeLists.txt index b4d4e3d1..80020ea1 100644 --- a/tools/linuxdeployqt/CMakeLists.txt +++ b/tools/linuxdeployqt/CMakeLists.txt @@ -9,7 +9,8 @@ add_definitions("-DLINUXDEPLOYQT_GIT_COMMIT=\"${GIT_COMMIT}\"") add_definitions("-DBUILD_DATE=\"${DATE}\"") add_definitions("-DBUILD_NUMBER=\"${BUILD_NUMBER}\"") -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) +find_package(Qt NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) +find_package(Qt${Qt_VERSION_MAJOR} COMPONENTS Core REQUIRED) option(UPGRADE_EXCLUDELIST_ONLINE "Updating excludelist online" ON) IF(UPGRADE_EXCLUDELIST_ONLINE)