fb1b20eab3
CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
# Copyright (C) 2022 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
if(TARGET WrapSystemJpeg::WrapSystemJpeg)
|
|
set(WrapSystemJpeg_FOUND TRUE)
|
|
return()
|
|
endif()
|
|
set(WrapSystemJpeg_REQUIRED_VARS __jpeg_found)
|
|
|
|
find_package(JPEG ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)
|
|
|
|
set(__jpeg_target_name "JPEG::JPEG")
|
|
if(JPEG_FOUND AND TARGET "${__jpeg_target_name}")
|
|
set(__jpeg_found TRUE)
|
|
endif()
|
|
|
|
if(JPEG_LIBRARIES)
|
|
list(PREPEND WrapSystemJpeg_REQUIRED_VARS JPEG_LIBRARIES)
|
|
endif()
|
|
if(JPEG_VERSION)
|
|
set(WrapSystemJpeg_VERSION "${JPEG_VERSION}")
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(WrapSystemJpeg
|
|
REQUIRED_VARS ${WrapSystemJpeg_REQUIRED_VARS}
|
|
VERSION_VAR WrapSystemJpeg_VERSION)
|
|
|
|
if(WrapSystemJpeg_FOUND)
|
|
add_library(WrapSystemJpeg::WrapSystemJpeg INTERFACE IMPORTED)
|
|
target_link_libraries(WrapSystemJpeg::WrapSystemJpeg
|
|
INTERFACE "${__jpeg_target_name}")
|
|
endif()
|
|
unset(__jpeg_target_name)
|
|
unset(__jpeg_found)
|