Warning, /libraries/phonon-vlc/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 if (MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
0002 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/apps/cmake/modules)
0003 find_package(KDEWin)
0004 if (KDEWIN_FOUND)
0005 include_directories(${KDEWIN_INCLUDES}/msvc)
0006 link_libraries(${KDEWIN_LIBRARIES})
0007 else (KDEWIN_FOUND)
0008 include(CheckIncludeFileCXX)
0009 check_include_file_cxx(inttypes.h HAVE_INTTYPES)
0010 check_include_file_cxx(stdint.h HAVE_STDINT)
0011 if ( NOT HAVE_STDINT AND NOT HAVE_INTTYPES )
0012 message (FATAL_ERROR "You don't have stdint.h and inttypes.h\n\t get them from http://code.google.com/p/baseutils/source/browse/#svn/trunk/msvc,\n\t or get kdewin http://websvn.kde.org/trunk/kdesupport/kdewin/")
0013 endif ( NOT HAVE_STDINT AND NOT HAVE_INTTYPES )
0014 endif (KDEWIN_FOUND)
0015 endif (MSVC OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
0016
0017 # NB: This is evaluated in the build system because the phonon headers
0018 # change behavior based on the defines, meaning the defines must already be set
0019 # by the time the headers are pre-processed!
0020 if(${PHONON_VERSION} VERSION_GREATER "4.9.50")
0021 message(STATUS "Building against Phonon 4.10 API")
0022 set(BACKEND_VERSION_DEFINE -DPHONON_BACKEND_VERSION_4_10)
0023 # Older not supported because backend doesn't build with older cmake rigging anwyay.
0024 endif()
0025 add_definitions(${BACKEND_VERSION_DEFINE}) # also automatically used for moc
0026
0027 set(phonon_vlc_SRCS
0028 audio/audiooutput.cpp
0029 audio/volumefadereffect.cpp
0030 backend.cpp
0031 devicemanager.cpp
0032 effect.cpp
0033 effectmanager.cpp
0034 media.cpp
0035 mediacontroller.cpp
0036 mediaobject.cpp
0037 mediaplayer.cpp
0038 sinknode.cpp
0039 streamreader.cpp
0040 # video/videodataoutput.cpp
0041 video/videowidget.cpp
0042 video/videomemorystream.cpp
0043 utils/debug.cpp
0044 utils/libvlc.cpp
0045
0046 audio/audiooutput.h
0047 audio/volumefadereffect.h
0048 backend.h
0049 devicemanager.h
0050 effect.h
0051 effectmanager.h
0052 media.h
0053 mediacontroller.h
0054 mediaobject.h
0055 mediaplayer.h
0056 sinknode.h
0057 streamreader.h
0058 # video/videodataoutput.cpp
0059 video/videowidget.h
0060 video/videomemorystream.h
0061 utils/debug.h
0062 utils/libvlc.h
0063 )
0064
0065 list(APPEND phonon_vlc_SRCS equalizereffect.cpp)
0066
0067 if(PHONON_EXPERIMENTAL)
0068 list(APPEND phonon_vlc_SRCS video/videodataoutput.cpp video/videodataoutput.h)
0069 endif()
0070
0071 if(APPLE)
0072 list(APPEND phonon_vlc_SRCS
0073 video/mac/nsvideoview.mm
0074 video/mac/vlcmacwidget.mm)
0075 endif()
0076
0077 ecm_create_qm_loader(phonon_vlc_SRCS phonon_vlc_qt)
0078 add_library(phonon_vlc_qt${QT_MAJOR_VERSION} MODULE ${phonon_vlc_SRCS})
0079 if(QT_MAJOR_VERSION STREQUAL 5)
0080 set_target_properties(phonon_vlc_qt${QT_MAJOR_VERSION} PROPERTIES INSTALL_NAME "phonon_vlc")
0081 endif()
0082 target_include_directories(phonon_vlc_qt${QT_MAJOR_VERSION}
0083 PRIVATE
0084 # Extra include. We use some internal stuff for easy chroma conversion.
0085 ${LIBVLC_INCLUDE_DIR}/vlc/plugins
0086 )
0087
0088 target_link_libraries(phonon_vlc_qt${QT_MAJOR_VERSION}
0089 Phonon::phonon4qt${QT_MAJOR_VERSION}
0090 Qt${QT_MAJOR_VERSION}::Core
0091 Qt${QT_MAJOR_VERSION}::Widgets
0092 LibVLC::Core
0093 LibVLC::LibVLC
0094 )
0095 if(PHONON_EXPERIMENTAL)
0096 target_link_libraries(phonon_vlc_qt${QT_MAJOR_VERSION} Phonon::phonon4qt${QT_MAJOR_VERSION}experimental)
0097 endif()
0098
0099 install(TARGETS phonon_vlc_qt${QT_MAJOR_VERSION} DESTINATION ${PHONON_BACKEND_DIR})
0100
0101 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
0102 ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
0103
0104 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/utils/mime.h.cmake
0105 ${CMAKE_CURRENT_BINARY_DIR}/utils/mime.h @ONLY)
0106
0107 # Instead of desktop files we are embedding the information into the plugin itself.
0108 # We have no KDE technology to help with finding the actual libraries anyway, so
0109 # we need to have the library path anyway.
0110 # Also see qtplugin/Q_PLUGIN_METADATA documentation.
0111 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/phonon-vlc.json.in
0112 ${CMAKE_CURRENT_BINARY_DIR}/phonon-vlc.json @ONLY)