summaryrefslogtreecommitdiffstats
path: root/cmake/FindAVFoundation.cmake
blob: 3dad5d67745568e9fd0cf51e77a20d13f3760589 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

find_library(AVFoundation_LIBRARY NAMES AVFoundation)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(AVFoundation DEFAULT_MSG AVFoundation_LIBRARY)

if(AVFoundation_FOUND AND NOT TARGET AVFoundation::AVFoundation)
    add_library(AVFoundation::AVFoundation INTERFACE IMPORTED)
    set_target_properties(AVFoundation::AVFoundation PROPERTIES
                          INTERFACE_LINK_LIBRARIES "${AVFoundation_LIBRARY}")
endif()

mark_as_advanced(AVFoundation_LIBRARY)