[vlmc-devel] [PATCH] MLT Backend: Implement FindMLT and FindMLTPP for cmake

Pawel Golinski golpaw1 at gmail.com
Tue May 24 00:49:04 CEST 2016


---
 cmake/FindMLT.cmake   | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 cmake/FindMLTPP.cmake | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
 create mode 100644 cmake/FindMLT.cmake
 create mode 100644 cmake/FindMLTPP.cmake

diff --git a/cmake/FindMLT.cmake b/cmake/FindMLT.cmake
new file mode 100644
index 0000000..fcda3ae
--- /dev/null
+++ b/cmake/FindMLT.cmake
@@ -0,0 +1,52 @@
+
+# CMake module to search for mlt
+# Author: Pawel Golinski <golpaw1 at gmail.com>
+#
+# If it's found it sets MLT_FOUND to TRUE
+# and following variables are set:
+#    MLT_INCLUDE_DIR
+#    MLT_LIBRARY
+
+# Put here path to custom location
+# example: /home/username/mlt/include etc..
+FIND_PATH(MLT_INCLUDE_DIR NAMES framework/mlt.h
+  HINTS "$ENV{MLT_INCLUDE_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/include"
+    "/usr/include"
+    "/usr/include/mlt"
+    "/usr/local/include"
+    "/usr/local/include/mlt"
+    # MingW
+    c:/msys/local/include
+  )
+FIND_PATH(MLT_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}/mlt" NAMES framework/mlt.h)
+
+# Put here path to custom location
+# example: /home/user/mlt/lib etc..
+FIND_LIBRARY(MLT_LIBRARY NAMES mlt libmlt
+  HINTS "$ENV{MLT_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    "/usr/lib"
+    "/usr/local/lib"
+    #mingw
+    c:/msys/local/lib
+  )
+FIND_LIBRARY(MLT_LIBRARY NAMES mlt libmlt)
+
+IF (MLT_INCLUDE_DIR AND MLT_LIBRARY)
+   SET(MLT_FOUND TRUE)
+ENDIF (MLT_INCLUDE_DIR AND MLT_LIBRARY)
+
+IF (MLT_FOUND)
+   IF (NOT MLT_FIND_QUIETLY)
+      MESSAGE(STATUS "Found mlt include-dir path: ${MLT_INCLUDE_DIR}")
+      MESSAGE(STATUS "Found mlt library path: ${MLT_LIBRARY}")
+   ENDIF (NOT MLT_FIND_QUIETLY)
+ELSE (MLT_FOUND)
+   IF (MLT_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find mlt")
+   ENDIF (MLT_FIND_REQUIRED)
+ENDIF (MLT_FOUND)
+
diff --git a/cmake/FindMLTPP.cmake b/cmake/FindMLTPP.cmake
new file mode 100644
index 0000000..d5756ca
--- /dev/null
+++ b/cmake/FindMLTPP.cmake
@@ -0,0 +1,57 @@
+
+# CMake module to search for mlt++
+# Author: Pawel Golinski <golpaw1 at gmail.com>
+#
+# If it's found it sets MLTPP_FOUND to TRUE
+# and following variables are set:
+#    MLTPP_INCLUDE_DIR
+#    MLTPP_LIBRARY
+#
+# Using pkg-config is not an option here,
+# as mlt++ ships with config.h header, so we
+# must namespace includes to avoid clashes with
+# cmake, and pkg-conig doesn't do that.
+
+# Put here path to custom location
+# example: /home/username/mlt++/include etc..
+FIND_PATH(MLTPP_INCLUDE_DIR NAMES mlt++/Mlt.h
+  HINTS "$ENV{MLTPP_INCLUDE_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/include"
+    "/usr/include"
+    "/usr/include/mlt++"
+    "/usr/local/include"
+    "/usr/local/include/mlt++"
+    # MingW
+    c:/msys/local/include
+  )
+FIND_PATH(MLTPP_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}" NAMES mlt++/Mlt.h)
+
+# Put here path to custom location
+# example: /home/user/mlt++/lib etc..
+FIND_LIBRARY(MLTPP_LIBRARY NAMES mlt++ libmlt++
+  HINTS "$ENV{MLTPP_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    "/usr/lib"
+    "/usr/local/lib"
+    #mingw
+    c:/msys/local/lib
+  )
+FIND_LIBRARY(MLTPP_LIBRARY NAMES mlt++ libmlt++)
+
+IF (MLTPP_INCLUDE_DIR AND MLTPP_LIBRARY)
+   SET(MLTPP_FOUND TRUE)
+ENDIF (MLTPP_INCLUDE_DIR AND MLTPP_LIBRARY)
+
+IF (MLTPP_FOUND)
+   IF (NOT MLTPP_FIND_QUIETLY)
+      MESSAGE(STATUS "Found mlt++ include-dir path: ${MLTPP_INCLUDE_DIR}")
+      MESSAGE(STATUS "Found mlt++ library path: ${MLTPP_LIBRARY}")
+   ENDIF (NOT MLTPP_FIND_QUIETLY)
+ELSE (MLTPP_FOUND)
+   IF (MLTPP_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could not find mlt++")
+   ENDIF (MLTPP_FIND_REQUIRED)
+ENDIF (MLTPP_FOUND)
+
-- 
2.7.4 (Apple Git-66)



More information about the Vlmc-devel mailing list