Warning, /graphics/digikam/core/libs/video/QtAVPlayer/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #
0002 # SPDX-FileCopyrightText: 2010-2024, Gilles Caulier, <caulier dot gilles at gmail dot com>
0003 #
0004 # SPDX-License-Identifier: BSD-3-Clause
0005 #
0006 
0007 APPLY_COMMON_POLICIES()
0008 
0009 # QtAVPlater depencency rules are managed from top level by core/cmake/rules/RulesMediaPlayer.cmake
0010 
0011 include_directories($<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Widgets,INTERFACE_INCLUDE_DIRECTORIES>
0012                     $<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Core,INTERFACE_INCLUDE_DIRECTORIES>
0013                     ${DIRECTX_LIBRARY_DIRS}             # Populated under Windows, else empty
0014 )
0015 
0016 set(libqtavplayer_SRCS
0017     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudiocodec.cpp
0018     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudiofilter.cpp
0019     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudioframe.cpp
0020     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudioinputfilter.cpp
0021     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudiooutput.cpp
0022     ${CMAKE_CURRENT_SOURCE_DIR}/qavaudiooutputfilter.cpp
0023     ${CMAKE_CURRENT_SOURCE_DIR}/qavcodec.cpp
0024     ${CMAKE_CURRENT_SOURCE_DIR}/qavdemuxer.cpp
0025     ${CMAKE_CURRENT_SOURCE_DIR}/qavfilter.cpp
0026     ${CMAKE_CURRENT_SOURCE_DIR}/qavfiltergraph.cpp
0027     ${CMAKE_CURRENT_SOURCE_DIR}/qavfilters.cpp
0028     ${CMAKE_CURRENT_SOURCE_DIR}/qavframecodec.cpp
0029     ${CMAKE_CURRENT_SOURCE_DIR}/qavframe.cpp
0030     ${CMAKE_CURRENT_SOURCE_DIR}/qavinoutfilter.cpp
0031     ${CMAKE_CURRENT_SOURCE_DIR}/qaviodevice.cpp
0032     ${CMAKE_CURRENT_SOURCE_DIR}/qavpacket.cpp
0033     ${CMAKE_CURRENT_SOURCE_DIR}/qavplayer.cpp
0034     ${CMAKE_CURRENT_SOURCE_DIR}/qavstream.cpp
0035     ${CMAKE_CURRENT_SOURCE_DIR}/qavstreamframe.cpp
0036     ${CMAKE_CURRENT_SOURCE_DIR}/qavsubtitlecodec.cpp
0037     ${CMAKE_CURRENT_SOURCE_DIR}/qavsubtitleframe.cpp
0038     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideobuffer_cpu.cpp
0039     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideobuffer_gpu.cpp
0040     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideocodec.cpp
0041     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideofilter.cpp
0042     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideoframe.cpp
0043     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideoinputfilter.cpp
0044     ${CMAKE_CURRENT_SOURCE_DIR}/qavvideooutputfilter.cpp
0045 )
0046 
0047 if(WIN32)
0048 
0049     set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0050         ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_d3d11.cpp
0051     )
0052 
0053 endif()
0054 
0055 if(VAAPI_FOUND)
0056 
0057     include_directories(${VAAPI_INCLUDE_DIRS})
0058 
0059     if(VAAPI_DRM_FOUND)
0060         set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0061             ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_vaapi_drm_egl.cpp
0062         )
0063     endif()
0064 
0065     if(VAAPI_X11_FOUND)
0066         set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0067             ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_vaapi_x11_glx.cpp
0068         )
0069     endif()
0070 
0071 endif()
0072 
0073 if(VDPAU_FOUND)
0074 
0075     include_directories(${VDPAU_INCLUDE_DIRS})
0076 
0077     set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0078         ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_vdpau.cpp
0079     )
0080 
0081 endif()
0082 
0083 if(APPLE)
0084 
0085     set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0086         ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_videotoolbox.mm
0087     )
0088 
0089 endif()
0090 
0091 if(ANDROID)
0092 
0093     set(libqtavplayer_SRCS ${libqtavplayer_SRCS}
0094         ${CMAKE_CURRENT_SOURCE_DIR}/qavandroidsurfacetexture.cpp
0095         ${CMAKE_CURRENT_SOURCE_DIR}/qavhwdevice_mediacodec.cpp
0096     )
0097 
0098 endif()
0099 
0100 # -------------------------------------------------------------------------
0101 
0102 # Used by digikamcore
0103 add_library(core_qtavplayer_obj OBJECT ${libqtavplayer_SRCS})
0104 
0105 target_compile_definitions(core_qtavplayer_obj
0106                            PRIVATE
0107                            digikamcore_EXPORTS
0108 )
0109 
0110 target_compile_definitions(core_qtavplayer_obj
0111                            PRIVATE
0112                            ${MEDIAPLAYER_DEFINITIONS}
0113 )
0114 
0115 target_compile_options(core_qtavplayer_obj
0116                        PRIVATE
0117                        ${MEDIAPLAYER_FLAGS}
0118 )