"Fossies" - the Fresh Open Source Software Archive

Member "MediaInfo_CLI_GNU_FromSource/MediaInfoLib/Project/CMake/CMakeLists.txt" (10 Sep 2019, 23641 Bytes) of package /linux/misc/MediaInfo_CLI_19.09_GNU_FromSource.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 19.07_vs_19.09.

    1 project(MediaInfoLib)
    2 
    3 cmake_minimum_required(VERSION 2.8.11)
    4 
    5 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
    6 
    7 set(MediaInfoLib_MAJOR_VERSION 19)
    8 set(MediaInfoLib_MINOR_VERSION 09)
    9 set(MediaInfoLib_PATCH_VERSION 0)
   10 set(MediaInfoLib_VERSION ${MediaInfoLib_MAJOR_VERSION}.${MediaInfoLib_MINOR_VERSION})
   11 
   12 if (MediaInfoLib_PATCH_VERSION)
   13   set(MediaInfoLib_VERSION ${MediaInfoLib_VERSION}.${MediaInfoLib_PATCH_VERSION})
   14 endif()
   15 
   16 set(MediaInfoLib_SOVERSION 0)
   17 
   18 if (NOT WIN32)
   19   option(BUILD_ZLIB "Build bundled zlib" OFF)
   20   option(BUILD_ZENLIB "Build bundled ZenLib" OFF)
   21 else()
   22   option(BUILD_ZLIB "Build bundled zlib" ON)
   23   option(BUILD_ZENLIB "Build bundled ZenLib" ON)
   24 endif()
   25 
   26 set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
   27 set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE STRING "Directory where binary will install")
   28 set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Directory where library will install")
   29 set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in")
   30 
   31 configure_file(
   32   "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
   33   "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
   34   IMMEDIATE @ONLY)
   35 
   36 if(NOT TARGET uninstall)
   37     add_custom_target(uninstall
   38    "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
   39 endif()
   40 
   41 if (NOT BUILD_ZENLIB)
   42   find_package(ZenLib REQUIRED)
   43 else()
   44   set(_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
   45   set(BUILD_SHARED_LIBS OFF)
   46   add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../../ZenLib/Project/CMake ${CMAKE_CURRENT_BINARY_DIR}/ZenLib)
   47   set(BUILD_SHARED_LIBS ${_BUILD_SHARED_LIBS})
   48   set(ZenLib_LIBRARY zen)
   49   unset(_BUILD_SHARED_LIBS)
   50   if(UNIX AND BUILD_SHARED_LIBS)
   51     target_compile_options(zen PRIVATE -fPIC)
   52   endif()
   53 endif()
   54 
   55 if (NOT BUILD_ZLIB)
   56   find_package(ZLIB REQUIRED)
   57 else()
   58   add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../../zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
   59   get_target_property(ZLIB_LIBRARIES zlibstatic LOCATION)
   60   if(NOT BUILD_SHARED_LIBS)
   61     get_filename_component(ZLIB_LIBRARIES ${ZLIB_LIBRARIES} NAME)
   62     set(ZLIB_LIBRARIES "${LIB_INSTALL_DIR}/${ZLIB_LIBRARIES}")
   63   endif()
   64   if(UNIX AND BUILD_SHARED_LIBS)
   65     target_compile_options(zlibstatic PRIVATE -fPIC)
   66   endif()
   67   set(ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
   68 endif()
   69 
   70 if(VCPKG_TARGET_TRIPLET)
   71   set(MediaInfoLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/mediainfolib")
   72 elseif(MSVC)
   73   set(MediaInfoLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake")
   74 else()
   75   set(MediaInfoLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/mediainfolib")
   76 endif()
   77 
   78 set(MediaInfoLib_SOURCES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../Source)
   79 
   80 # On Windows debug library should have 'd' postfix.
   81 if(WIN32)
   82   set(CMAKE_DEBUG_POSTFIX "d")
   83 elseif(APPLE)
   84   set(CMAKE_DEBUG_POSTFIX "_debug")
   85 endif()
   86 
   87 # use bundled tinyxml only if no system
   88 find_package(TinyXML)
   89 
   90 # use system curl if is present
   91 find_package(CURL)
   92 
   93 include_directories(${MediaInfoLib_SOURCES_PATH})
   94 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/)
   95 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/base64/)
   96 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/)
   97 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha1-gladman/)
   98 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha2-gladman/)
   99 include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/hmac-gladman/)
  100 include_directories(${ZLIB_INCLUDE_DIRS})
  101 
  102 set(MediaInfoLib_PUBLIC_HDRS
  103   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo.h
  104   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfoList.h
  105   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Const.h
  106   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Events.h
  107   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoDLL.h
  108   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoDLL_Static.h
  109 )
  110 
  111 set(MediaInfoLib_SRCS
  112   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/md5.c
  113   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/aes_modes.c
  114   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/aescrypt.c
  115   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/aeskey.c
  116   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/aestab.c
  117   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha1-gladman/sha1.c
  118   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha2-gladman/sha2.c
  119   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/hmac-gladman/hmac.c
  120   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze.cpp
  121   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze_Buffer.cpp
  122   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze_Buffer_MinimizeSize.cpp
  123   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze_Element.cpp
  124   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze_Streams.cpp
  125   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Analyze_Streams_Finish.cpp
  126   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Base.cpp
  127   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__MultipleParsing.cpp
  128   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__Duplicate.cpp
  129   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File__HasReferences.cpp
  130   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File_Dummy.cpp
  131   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File_Other.cpp
  132   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/File_Unknown.cpp
  133   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/HashWrapper.cpp
  134   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo.cpp
  135   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Config.cpp
  136   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Config_Automatic.cpp
  137   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Config_MediaInfo.cpp
  138   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Config_PerPackage.cpp
  139   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_File.cpp
  140   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Inform.cpp
  141   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfo_Internal.cpp
  142   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfoList.cpp
  143   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/MediaInfoList_Internal.cpp
  144   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/TimeCode.cpp
  145   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_7z.cpp
  146   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Ace.cpp
  147   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Bzip2.cpp
  148   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Elf.cpp
  149   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Gzip.cpp
  150   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Iso9660.cpp
  151   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Mz.cpp
  152   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Rar.cpp
  153   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Tar.cpp
  154   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Archive/File_Zip.cpp
  155   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac.cpp
  156   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac_GeneralAudio.cpp
  157   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr.cpp
  158   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac_GeneralAudio_Sbr_Ps.cpp
  159   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac_Main.cpp
  160   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Aac_Others.cpp
  161   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Ac3.cpp
  162   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Ac4.cpp
  163   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Adpcm.cpp
  164   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Als.cpp
  165   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Amr.cpp
  166   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Amv.cpp
  167   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Ape.cpp
  168   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Au.cpp
  169   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Caf.cpp
  170   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Celt.cpp
  171   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_ChannelGrouping.cpp
  172   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Dsdiff.cpp
  173   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Dsf.cpp
  174   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Dts.cpp
  175   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_DolbyE.cpp
  176   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_ExtendedModule.cpp
  177   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Flac.cpp
  178   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_ImpulseTracker.cpp
  179   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_La.cpp
  180   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Midi.cpp
  181   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Module.cpp
  182   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Mpc.cpp
  183   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_MpcSv8.cpp
  184   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Mpega.cpp
  185   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_OpenMG.cpp
  186   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Opus.cpp
  187   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Pcm.cpp
  188   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Pcm_M2ts.cpp
  189   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Pcm_Vob.cpp
  190   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Ps2Audio.cpp
  191   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Rkau.cpp
  192   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_ScreamTracker3.cpp
  193   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_SmpteSt0302.cpp
  194   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_SmpteSt0337.cpp
  195   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_SmpteSt0331.cpp
  196   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Speex.cpp
  197   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Tak.cpp
  198   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Tta.cpp
  199   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_TwinVQ.cpp
  200   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Usac.cpp
  201   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Vorbis.cpp
  202   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Audio/File_Wvpk.cpp
  203   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Duplicate/File__Duplicate__Base.cpp
  204   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Duplicate/File__Duplicate__Writer.cpp
  205   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Duplicate/File__Duplicate_MpegTs.cpp
  206   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_EbuCore.cpp
  207   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_Niso.cpp
  208   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_Fims.cpp
  209   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_Mpeg7.cpp
  210   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_PBCore.cpp
  211   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_PBCore2.cpp
  212   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Export/Export_reVTMD.cpp
  213   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_ArriRaw.cpp
  214   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Bmp.cpp
  215   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Bpg.cpp
  216   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Dds.cpp
  217   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Dpx.cpp
  218   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Exr.cpp
  219   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Gif.cpp
  220   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Ico.cpp
  221   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Jpeg.cpp
  222   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Pcx.cpp
  223   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Png.cpp
  224   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Psd.cpp
  225   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Rle.cpp
  226   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Tiff.cpp
  227   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Image/File_Tga.cpp
  228   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File__ReferenceFilesHelper.cpp
  229   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File__ReferenceFilesHelper_Resource.cpp
  230   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File__ReferenceFilesHelper_Sequence.cpp
  231   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Aaf.cpp
  232   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ancillary.cpp
  233   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Bdmv.cpp
  234   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Cdxa.cpp
  235   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DashMpd.cpp
  236   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DcpAm.cpp
  237   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DcpCpl.cpp
  238   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DcpPkl.cpp
  239   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Dpg.cpp
  240   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DvDif.cpp
  241   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_DvDif_Analysis.cpp
  242   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Dvdv.cpp
  243   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Dxw.cpp
  244   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Flv.cpp
  245   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Gxf.cpp
  246   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_HdsF4m.cpp
  247   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Hls.cpp
  248   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Gxf.cpp
  249   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Gxf_TimeCode.cpp
  250   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ibi.cpp
  251   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ibi_Creation.cpp
  252   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ism.cpp
  253   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ivf.cpp
  254   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Lxf.cpp
  255   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mk.cpp
  256   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_MiXml.cpp
  257   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg4.cpp
  258   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg4_Descriptors.cpp
  259   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg4_Elements.cpp
  260   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg4_TimeCode.cpp
  261   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg_Descriptors.cpp
  262   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mpeg_Psi.cpp
  263   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_MpegPs.cpp
  264   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_MpegTs.cpp
  265   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_MpegTs_Duplicate.cpp
  266   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Mxf.cpp
  267   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Nut.cpp
  268   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ogg.cpp
  269   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ogg_SubElement.cpp
  270   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_P2_Clip.cpp
  271   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Pmp.cpp
  272   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Ptx.cpp
  273   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Riff.cpp
  274   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Riff_Elements.cpp
  275   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Rm.cpp
  276   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_SequenceInfo.cpp
  277   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Skm.cpp
  278   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Swf.cpp
  279   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Umf.cpp
  280   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Vbi.cpp
  281   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Wm.cpp
  282   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Wm_Elements.cpp
  283   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Wtv.cpp
  284   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Multiple/File_Xdcam_Clip.cpp
  285   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Reader/Reader_Directory.cpp
  286   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Reader/Reader_File.cpp
  287   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Reader/Reader_libcurl.cpp
  288   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Reader/Reader_libmms.cpp
  289   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File__Tags.cpp
  290   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_ApeTag.cpp
  291   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_Id3.cpp
  292   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_Id3v2.cpp
  293   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_Lyrics3.cpp
  294   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_Lyrics3v2.cpp
  295   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_PropertyList.cpp
  296   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_VorbisCom.cpp
  297   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Tag/File_Xmp.cpp
  298   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_AribStdB24B37.cpp
  299   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Cdp.cpp
  300   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Cmml.cpp
  301   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_DvbSubtitle.cpp
  302   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_DtvccTransport.cpp
  303   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Eia608.cpp
  304   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Eia708.cpp
  305   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Kate.cpp
  306   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_N19.cpp
  307   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_OtherText.cpp
  308   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Pdf.cpp
  309   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Pgs.cpp
  310   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Scc.cpp
  311   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Scte20.cpp
  312   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Sdp.cpp
  313   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_SubRip.cpp
  314   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Teletext.cpp
  315   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_TimedText.cpp
  316   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Text/File_Ttml.cpp
  317   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Aic.cpp
  318   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_AfdBarData.cpp
  319   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Av1.cpp
  320   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Avc.cpp
  321   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Avc_Duplicate.cpp
  322   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_AvsV.cpp
  323   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Canopus.cpp
  324   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Dirac.cpp
  325   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_DolbyVisionMetadata.cpp
  326   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Ffv1.cpp
  327   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Flic.cpp
  328   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Fraps.cpp
  329   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_H263.cpp
  330   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Hevc.cpp
  331   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_HuffYuv.cpp
  332   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Lagarith.cpp
  333   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Mpeg4v.cpp
  334   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Mpegv.cpp
  335   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_ProRes.cpp
  336   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Theora.cpp
  337   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Vc1.cpp
  338   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Vc3.cpp
  339   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Vp8.cpp
  340   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/Video/File_Y4m.cpp
  341   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/XmlUtils.cpp
  342   ${MediaInfoLib_SOURCES_PATH}/MediaInfo/OutputHelpers.cpp
  343   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoJNI.cpp
  344   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoDLL.cpp
  345   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoDLL.def
  346   ${MediaInfoLib_SOURCES_PATH}/MediaInfoDLL/MediaInfoDLL.rc
  347 )
  348 
  349 if(WIN32)
  350   # aes_ni.h has windows-only include
  351   set(MediaInfoLib_SRCS ${MediaInfoLib_SRCS} ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/aes_ni.c)
  352 endif()
  353 
  354 if(NOT TinyXML_FOUND)
  355   include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/tinyxml2/)
  356   list(APPEND MediaInfoLib_SRCS ${MediaInfoLib_SOURCES_PATH}/ThirdParty/tinyxml2/tinyxml2.cpp)
  357 endif()
  358 
  359 add_library(mediainfo ${MediaInfoLib_SRCS})
  360 target_include_directories(mediainfo INTERFACE ${INCLUDE_INSTALL_DIR})
  361 
  362 if(BUILD_ZLIB)
  363   add_dependencies(mediainfo zlibstatic)
  364 endif()
  365 
  366 # disable some features. Maybe it should be enabled.
  367 target_compile_definitions(mediainfo PRIVATE MEDIAINFO_LIBMMS_NO)
  368 if(NOT CURL_FOUND)
  369   target_compile_definitions(mediainfo PRIVATE MEDIAINFO_LIBCURL_NO)
  370 else()
  371   include_directories(${CURL_INCLUDE_DIRS})
  372   target_link_libraries(mediainfo ${CURL_LIBRARIES})
  373   set(CURL_PC " libcurl")
  374   set(CURL_LIB " -lcurl")
  375 endif()
  376 
  377 target_include_directories(mediainfo PRIVATE
  378   ${CMAKE_CURRENT_SOURCE_DIR}/../../../ZenLib/Source
  379   ${MediaInfoLib_SOURCES_PATH}
  380   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/
  381   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/base64/
  382   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/aes-gladman/
  383   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha1-gladman/
  384   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/sha2-gladman/
  385   ${MediaInfoLib_SOURCES_PATH}/ThirdParty/hmac-gladman/)
  386 
  387 if(NOT TinyXML_FOUND)
  388   target_include_directories(mediainfo PRIVATE ${MediaInfoLib_SOURCES_PATH}/ThirdParty/tinyxml2/)
  389 else()
  390   target_link_libraries(mediainfo "${TinyXML_LIBRARIES}")
  391 endif()
  392 
  393 if(BUILD_ZENLIB)
  394   target_include_directories(mediainfo PRIVATE ${ZLIB_INCLUDE_DIRS})
  395 endif()
  396 
  397 target_link_libraries(mediainfo ${ZenLib_LIBRARY} ${ZLIB_LIBRARIES})
  398 
  399 if(MSVC AND BUILD_SHARED_LIBS)
  400   get_target_property(LOCATION mediainfo LOCATION_DEBUG)
  401   string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
  402   install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
  403 
  404   get_target_property(LOCATION mediainfo LOCATION_RELWITHDEBINFO)
  405   string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
  406   install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
  407 endif()
  408 
  409 if (APPLE)
  410   set_target_properties(mediainfo PROPERTIES
  411     VERSION "${MediaInfoLib_SOVERSION}.${MediaInfoLib_MAJOR_VERSION}.${MediaInfoLib_MINOR_VERSION}"
  412     SOVERSION ${MediaInfoLib_SOVERSION})
  413 else()
  414   set_target_properties(mediainfo PROPERTIES
  415     VERSION "${MediaInfoLib_SOVERSION}.${MediaInfoLib_MAJOR_VERSION}${MediaInfoLib_MINOR_VERSION}.${MediaInfoLib_PATCH_VERSION}"
  416     SOVERSION ${MediaInfoLib_SOVERSION})
  417 endif()
  418 
  419 install(TARGETS mediainfo EXPORT mediainfo-export
  420   RUNTIME DESTINATION ${BIN_INSTALL_DIR}
  421   ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
  422   LIBRARY DESTINATION ${LIB_INSTALL_DIR})
  423 
  424 install(EXPORT mediainfo-export DESTINATION ${MediaInfoLib_CONFIG_INSTALL_DIR} FILE MediaInfoLibTargets.cmake)
  425 
  426 foreach(HEADER ${MediaInfoLib_PUBLIC_HDRS})
  427   string(REPLACE ${MediaInfoLib_SOURCES_PATH} "" DIR ${HEADER})
  428   string(REGEX REPLACE "/[^/]*$" "" DIR ${DIR})
  429   install(FILES ${HEADER} DESTINATION include/${DIR})
  430 endforeach(HEADER ${MediaInfoLib_PUBLIC_HDRS})
  431 
  432 # pkg-config
  433 find_package(PkgConfig)
  434 if(PKG_CONFIG_FOUND)
  435   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libmediainfo.pc.in
  436                  ${CMAKE_CURRENT_BINARY_DIR}/libmediainfo.pc
  437                  @ONLY)
  438   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmediainfo.pc
  439           DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
  440 endif()
  441 
  442 # cmake-modules
  443 include(CMakePackageConfigHelpers)
  444 configure_package_config_file(
  445   MediaInfoLibConfig.cmake.in
  446   "${CMAKE_CURRENT_BINARY_DIR}/MediaInfoLibConfig.cmake"
  447   INSTALL_DESTINATION ${MediaInfoLib_CONFIG_INSTALL_DIR}
  448   PATH_VARS BIN_INSTALL_DIR
  449             LIB_INSTALL_DIR
  450             INCLUDE_INSTALL_DIR)
  451 
  452 write_basic_config_version_file(MediaInfoLibConfigVersion.cmake VERSION ${MediaInfoLib_VERSION} COMPATIBILITY AnyNewerVersion)
  453 
  454 install(FILES
  455   ${CMAKE_CURRENT_BINARY_DIR}/MediaInfoLibConfig.cmake
  456   ${CMAKE_CURRENT_BINARY_DIR}/MediaInfoLibConfigVersion.cmake
  457   DESTINATION ${MediaInfoLib_CONFIG_INSTALL_DIR})