1# - Try to find DvdRead 2# Once done this will define 3# 4# DVDREAD_FOUND - system has DvdRead 5# DVDREAD_INCLUDE_DIR - the DvdRead include directory 6# DVDREAD_LIBRARIES - Link these to use DvdRead 7# DVDREAD_DEFINITIONS - Compiler switches required for using DvdRead 8# 9# SPDX-FileCopyrightText: 2007 Laurent Montel <montel@kde.org> 10# SPDX-License-Identifier: BSD-3-Clause 11 12if( DVDREAD_INCLUDE_DIR AND DVDREAD_LIBRARIES ) 13 # in cache already 14 set(DvdRead_FIND_QUIETLY TRUE) 15endif() 16 17find_path(DVDREAD_INCLUDE_DIR NAMES dvdread/dvd_reader.h) 18 19find_library(DVDREAD_LIBRARIES NAMES dvdread) 20 21include(FindPackageHandleStandardArgs) 22find_package_handle_standard_args(DvdRead DEFAULT_MSG DVDREAD_INCLUDE_DIR DVDREAD_LIBRARIES) 23 24if(DVDREAD_FOUND) 25 add_library(dvdread SHARED IMPORTED) 26 set_target_properties(dvdread PROPERTIES 27 INTERFACE_INCLUDE_DIRECTORIES "${DVDREAD_INCLUDE_DIR}" 28 IMPORTED_LOCATION "${DVDREAD_LIBRARIES}" 29 ) 30endif() 31 32# show the DVDREAD_INCLUDE_DIR and DVDREAD_LIBRARIES variables only in the advanced view 33mark_as_advanced(DVDREAD_INCLUDE_DIR DVDREAD_LIBRARIES) 34