Dial down the cmake verbosity

This commit is contained in:
Robert Griebl
2023-05-27 20:07:02 +02:00
parent 1510dbdda4
commit eb01d4499a
3 changed files with 22 additions and 8 deletions
+5 -6
View File
@@ -31,6 +31,7 @@ option(FORCE_MOBILE "Force a mobile build on desktop" OFF)
option(SANITIZE "Build with ASAN" OFF)
option(MODELTEST "Build with modeltest" OFF)
option(SENTRY "Build with sentry.io support" OFF)
option(VERBOSE_FETCH "Verbose output for 3rd party FetchContent" OFF)
set(BRICKLINK_AFFILIATE_API_KEY "" CACHE STRING "BrickLink's Affiliate API key")
set(NAME "BrickStore")
@@ -61,8 +62,7 @@ project(BrickStore
HOMEPAGE_URL "https://${BRICKSTORE_URL}"
LANGUAGES CXX C
)
find_package(Qt6 COMPONENTS Core REQUIRED)
find_package(Qt6 CONFIG QUIET COMPONENTS Core REQUIRED)
include(QtPlatformSupport) # load all the platform names
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
@@ -127,11 +127,10 @@ add_compile_definitions(
QT_USE_QSTRINGBUILDER
)
find_package(Qt6
find_package(Qt6 CONFIG QUIET
REQUIRED Core Gui Xml Network Concurrent Sql LinguistTools
OPTIONAL_COMPONENTS ToolsTools
)
set(MIN_QT_VERSION 6.2.0)
if (ANDROID OR IOS OR FORCE_MOBILE)
@@ -140,7 +139,7 @@ if (ANDROID OR IOS OR FORCE_MOBILE)
set(MIN_QT_VERSION 6.5.0)
add_compile_definitions(BS_MOBILE)
set(QUICK_CONTROLS "QtQuick.Controls.Material")
find_package(Qt6 REQUIRED Qml Quick Quick3D QuickControls2Impl QuickDialogs2 QuickTemplates2 QuickDialogs2Utils Svg)
find_package(Qt6 CONFIG QUIET REQUIRED Qml Quick Quick3D QuickControls2Impl QuickDialogs2 QuickTemplates2 QuickDialogs2Utils Svg)
elseif (BACKEND_ONLY)
set(BS_BACKEND ON)
@@ -151,7 +150,7 @@ else()
set(BS_DESKTOP ON)
set(BS_TYPE "Desktop")
add_compile_definitions(BS_DESKTOP)
find_package(Qt6 REQUIRED Widgets PrintSupport Qml Quick Quick3D Multimedia MultimediaWidgets)
find_package(Qt6 CONFIG QUIET REQUIRED Widgets PrintSupport Qml Quick Quick3D Multimedia MultimediaWidgets)
endif()
+9 -2
View File
@@ -20,12 +20,19 @@ FetchContent_Declare(
GIT_TAG v${QCORO_VERSION}
)
# we need EXCLUDE_FROM_ALL to suppress the installation of qcoro into the macOS bundle
# and Linux packages
FetchContent_GetProperties(qcoro)
if(NOT qcoro_POPULATED)
if (NOT qcoro_POPULATED)
FetchContent_Populate(qcoro)
set(mll ${CMAKE_MESSAGE_LOG_LEVEL})
if (NOT VERBOSE_FETCH)
set(CMAKE_MESSAGE_LOG_LEVEL NOTICE)
endif()
add_subdirectory(${qcoro_SOURCE_DIR} ${qcoro_BINARY_DIR} EXCLUDE_FROM_ALL)
set(CMAKE_MESSAGE_LOG_LEVEL ${mll})
endif()
+8
View File
@@ -20,4 +20,12 @@ FetchContent_Declare(
FetchContent_MakeAvailable(sentry)
FetchContent_GetProperties(sentry)
set(mll ${CMAKE_MESSAGE_LOG_LEVEL})
if (NOT VERBOSE_FETCH)
set(CMAKE_MESSAGE_LOG_LEVEL NOTICE)
endif()
add_subdirectory(${sentry_SOURCE_DIR} ${sentry_BINARY_DIR} EXCLUDE_FROM_ALL)
set(CMAKE_MESSAGE_LOG_LEVEL ${mll})