diff --git a/CMakeLists.txt b/CMakeLists.txt index cbde769d3f..bbeb92ca4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,11 +102,14 @@ include("${CMAKE_BINARY_DIR}/vcpkg.cmake") if (HIFI_ANDROID) set(QT_CMAKE_PREFIX_PATH "$ENV{HIFI_ANDROID_PRECOMPILED}/qt/lib/cmake") else() - if (NOT DEFINED ENV{VIRCADIA_USE_SYSTEM_QT}) - if(NOT EXISTS "${CMAKE_BINARY_DIR}/qt.cmake") + if ("$ENV{VIRCADIA_USE_SYSTEM_QT}" STREQUAL "") + if(NOT EXISTS "${CMAKE_BINARY_DIR}/qt.cmake") message(FATAL_ERROR "qt configuration missing.") endif() include("${CMAKE_BINARY_DIR}/qt.cmake") + message(STATUS "${CMAKE_BINARY_DIR}/qt.cmake included!") + else() + message(STATUS "System Qt in use, not including qt.cmake!") endif() endif() @@ -293,7 +296,7 @@ set_packaging_parameters() # Locate the required Qt build on the filesystem setup_qt() -if (NOT DEFINED ENV{VIRCADIA_USE_SYSTEM_QT}) +if ("$ENV{VIRCADIA_USE_SYSTEM_QT}" STREQUAL "") list(APPEND CMAKE_PREFIX_PATH "${QT_CMAKE_PREFIX_PATH}") endif() diff --git a/hifi_qt.py b/hifi_qt.py index e5f54ea545..530aaff8ec 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -37,7 +37,7 @@ endif() system_qt = False # Here we handle the 3 possible cases of dealing with Qt: - if os.getenv('VIRCADIA_USE_SYSTEM_QT'): + if os.getenv('VIRCADIA_USE_SYSTEM_QT', "") != "": # 1. Using the system provided Qt. This is only recommended for Qt 5.15.0 and above, # as it includes a required fix on Linux. # @@ -53,7 +53,7 @@ endif() system_qt = True print("Using system Qt") - elif os.getenv('VIRCADIA_QT_PATH'): + elif os.getenv('VIRCADIA_QT_PATH', "") != "": # 2. Using an user-provided directory. # VIRCADIA_QT_PATH must point to a directory with a Qt install in it. diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 267f996535..f6d84e4e4b 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -435,7 +435,7 @@ else() endif() endif() -if (NOT DEFINED ENV{VIRCADIA_USE_SYSTEM_QT}) +if ("$ENV{VIRCADIA_USE_SYSTEM_QT}" STREQUAL "") if (DEV_BUILD AND (APPLE OR UNIX)) # create a qt.conf file to override hard-coded search paths in Qt libs set(QT_LIB_PATH "${QT_CMAKE_PREFIX_PATH}/../..")