File: FindMLT.cmake

package info (click to toggle)
kdenlive 25.12.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 125,932 kB
  • sloc: cpp: 206,733; xml: 11,858; python: 1,139; ansic: 1,054; javascript: 578; sh: 389; makefile: 15
file content (72 lines) | stat: -rw-r--r-- 1,575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Find the MLT includes and libraries
#
# SPDX-FileCopyrightText: 2007-2012 Jean-Baptiste Mardell <jb@kdenlive.org>
# SPDX-FileCopyrightText: 2012 Alberto Villa <avilla@FreeBSD.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use is allowed according to the terms of the BSD license.

find_package(PkgConfig QUIET)
pkg_check_modules(PC_MLT mlt++-7)

# Workaround cmake 3.17 issue (dropped .dll extension for library search)
if(WIN32)
    list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .dll)
endif()

find_path(MLT_INCLUDE_DIR
  NAMES framework/mlt.h
  HINTS
    ${PC_MLT_INCLUDEDIR}
    ${PC_MLT_PREFIX}/include
  PATHS
    /usr/local/include
    /usr/include
  PATH_SUFFIXES mlt-7
)

find_library(MLT_LIBRARIES
  NAMES mlt-7
  HINTS
    ${PC_MLT_LIBDIR}
    ${PC_MLT_PREFIX}/lib
  PATHS
    /usr/local/lib
    /usr/lib
)

find_path(MLTPP_INCLUDE_DIR
  NAMES mlt++/Mlt.h
  HINTS
    ${PC_MLT_INCLUDEDIR}
    ${PC_MLT_PREFIX}/include
  PATHS
    /usr/local/include
    /usr/include
  PATH_SUFFIXES mlt-7
)

find_library(MLTPP_LIBRARIES
  NAMES mlt++-7
  HINTS
    ${PC_MLT_LIBDIR}
    ${PC_MLT_PREFIX}/lib
  PATHS
    /usr/local/lib
    /usr/lib
)

get_filename_component(MLT_ROOT_DIR ${MLTPP_INCLUDE_DIR} PATH)

if(PC_MLT_VERSION)
  set(MLT_VERSION_STRING ${PC_MLT_VERSION})
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MLT
  REQUIRED_VARS MLT_LIBRARIES MLTPP_LIBRARIES MLT_INCLUDE_DIR MLTPP_INCLUDE_DIR
  VERSION_VAR MLT_VERSION_STRING
)

mark_as_advanced(MLT_INCLUDE_DIR MLT_LIBRARIES MLTPP_INCLUDE_DIR MLTPP_LIBRARIES)