Mark Cups::Cups optional target when building for non-APPLE systems
Relax the dependency on Cups for PrintSupport module on non-APPLE platforms. 30bb15e7bf42a07b49700b6e822513f125d9ed4d added the missing dependency for the PrintSupportPrivate target, but made it required. In general users not necessarly need the Cups found when linking PrintSupport on non-APPLE platforms. So we may mark Cups optional. We also need Cups as the required dependency when Qt is built statically, since then QCupsPrinterSupportPlugin will require the library to be found. Amends 30bb15e7bf42a07b49700b6e822513f125d9ed4d Pick-to: 6.5 6.7 6.8 Change-Id: Ia31d52f7beb9fab6ffa5123147a243f5be6345ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
8b3865e151
commit
cce81f296e
@ -1,7 +1,12 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
qt_find_package(Cups PROVIDED_TARGETS Cups::Cups)
|
||||
if(NOT APPLE AND BUILD_SHARED_LIBS)
|
||||
set(mark_cups_optional MARK_OPTIONAL)
|
||||
else()
|
||||
set(mark_cups_optional "")
|
||||
endif()
|
||||
qt_find_package(Cups PROVIDED_TARGETS Cups::Cups ${mark_cups_optional})
|
||||
|
||||
#####################################################################
|
||||
## QCupsPrinterSupportPlugin Plugin:
|
||||
|
@ -9,8 +9,13 @@
|
||||
|
||||
#### Libraries
|
||||
|
||||
qt_find_package(Cups PROVIDED_TARGETS Cups::Cups MODULE_NAME printsupport QMAKE_LIB cups)
|
||||
|
||||
if(NOT APPLE AND BUILD_SHARED_LIBS)
|
||||
set(mark_cups_optional MARK_OPTIONAL)
|
||||
else()
|
||||
set(mark_cups_optional "")
|
||||
endif()
|
||||
qt_find_package(Cups PROVIDED_TARGETS Cups::Cups
|
||||
MODULE_NAME printsupport QMAKE_LIB cups ${mark_cups_optional})
|
||||
|
||||
#### Tests
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user