From 07c2d80b0ce1231a11ae98270c4ea9a93b20db22 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 4 Jun 2019 13:29:16 -0700 Subject: [PATCH] fix ubuntu debian patch to track changes to Qt library handling --- debian/patches/hifi_use_system_qt.diff | 76 +++++++++++++------------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/debian/patches/hifi_use_system_qt.diff b/debian/patches/hifi_use_system_qt.diff index 2bd7009928..7f42e3e610 100644 --- a/debian/patches/hifi_use_system_qt.diff +++ b/debian/patches/hifi_use_system_qt.diff @@ -1,43 +1,41 @@ -Index: hifi-interface-84/cmake/macros/SetupQt.cmake +Index: hifi/cmake/macros/SetupQt.cmake =================================================================== ---- hifi-interface-84.orig/cmake/macros/SetupQt.cmake -+++ hifi-interface-84/cmake/macros/SetupQt.cmake -@@ -18,19 +18,19 @@ function(calculate_default_qt_dir _QT_VE - elseif(WIN32) - set(QT_DEFAULT_ARCH "msvc2017_64") - else() -- set(QT_DEFAULT_ARCH "gcc_64") -+ set(QT_DEFAULT_ARCH "x86_64-linux-gnu") - endif() +--- hifi.orig/cmake/macros/SetupQt.cmake ++++ hifi/cmake/macros/SetupQt.cmake +@@ -27,7 +27,7 @@ function(calculate_qt5_version result _Q + set(_QT_CORE_DIR "${_QT_DIR}/include/QtCore") + endif() + if(NOT EXISTS "${_QT_CORE_DIR}") +- message(FATAL_ERROR "Could not find 'include/QtCore' in '${_QT_DIR}'") ++ message("Could not find 'include/QtCore' in '${_QT_DIR}'") + endif() + set(subdirs "") + get_sub_directories(subdirs ${_QT_CORE_DIR}) +@@ -71,13 +71,13 @@ macro(setup_qt) - if (WIN32 OR (ANDROID AND ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows"))) - set(QT_DEFAULT_ROOT "c:/Qt") - else() -- set(QT_DEFAULT_ROOT "$ENV{HOME}/Qt") -+ set(QT_DEFAULT_ROOT "/usr/lib") - endif() + message("QT_CMAKE_PREFIX_PATH = " ${QT_CMAKE_PREFIX_PATH}) - set_from_env(QT_ROOT QT_ROOT ${QT_DEFAULT_ROOT}) - set_from_env(QT_ARCH QT_ARCH ${QT_DEFAULT_ARCH}) +- # figure out where the qt dir is +- get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) +- set(QT_VERSION "unknown") +- calculate_qt5_version(QT_VERSION "${QT_DIR}") +- if (QT_VERSION STREQUAL "unknown") +- message(FATAL_ERROR "Could not determine QT_VERSION") +- endif() ++ # # figure out where the qt dir is ++ # get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) ++ # set(QT_VERSION "unknown") ++ # calculate_qt5_version(QT_VERSION "${QT_DIR}") ++ # if (QT_VERSION STREQUAL "unknown") ++ # message(FATAL_ERROR "Could not determine QT_VERSION") ++ # endif() -- set(${_RESULT_NAME} "${QT_ROOT}/${_QT_VERSION}/${QT_ARCH}" PARENT_SCOPE) -+ set(${_RESULT_NAME} "${QT_ROOT}/${QT_ARCH}" PARENT_SCOPE) - endfunction() - - # Sets the QT_CMAKE_PREFIX_PATH and QT_DIR variables -@@ -44,7 +44,7 @@ macro(setup_qt) - endif() - if (("QT_CMAKE_PREFIX_PATH" STREQUAL "") OR (NOT EXISTS "${QT_CMAKE_PREFIX_PATH}")) - calculate_default_qt_dir(${QT_VERSION} QT_DIR) -- set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/lib/cmake") -+ set(QT_CMAKE_PREFIX_PATH "${QT_DIR}/cmake") - else() - # figure out where the qt dir is - get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) -Index: hifi-interface-84/interface/CMakeLists.txt + if(WIN32) + # windows shell does not like backslashes expanded on the command line, +Index: hifi/interface/CMakeLists.txt =================================================================== ---- hifi-interface-84.orig/interface/CMakeLists.txt -+++ hifi-interface-84/interface/CMakeLists.txt +--- hifi.orig/interface/CMakeLists.txt ++++ hifi/interface/CMakeLists.txt @@ -35,7 +35,7 @@ else () add_custom_command( OUTPUT ${RESOURCES_RCC} @@ -60,11 +58,11 @@ Index: hifi-interface-84/interface/CMakeLists.txt + endif() - if (SCRIPTS_INSTALL_DIR) -Index: hifi-interface-84/tools/nitpick/CMakeLists.txt + if (DEV_BUILD AND (APPLE OR UNIX)) +Index: hifi/tools/nitpick/CMakeLists.txt =================================================================== ---- hifi-interface-84.orig/tools/nitpick/CMakeLists.txt -+++ hifi-interface-84/tools/nitpick/CMakeLists.txt +--- hifi.orig/tools/nitpick/CMakeLists.txt ++++ hifi/tools/nitpick/CMakeLists.txt @@ -12,7 +12,7 @@ generate_qrc(OUTPUT ${RESOURCES_QRC} PAT add_custom_command( OUTPUT ${RESOURCES_RCC}