From 7ccae55b59d11378b203015d8d2dd33314f22a28 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Fri, 21 Apr 2017 14:33:43 +0200 Subject: CMake: include a FindFFMPEG module and use it Thankfully taken from https://github.com/robotology/ycm/blob/master/find-modules/FindFFMPEG.cmake --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d39672e..8381445 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ set(LIBVNCSRVEXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples) set(LIBVNCCLIEXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/client_examples) set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/test) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libvncserver ${CMAKE_CURRENT_SOURCE_DIR}/common) @@ -41,6 +42,7 @@ option(WITH_GNUTLS "Search for the GnuTLS secure communications library to suppo option(WITH_OPENSSL "Search for the OpenSSL cryptography library to support encryption" ON) option(WITH_SYSTEMD "Search for libsystemd to build with systemd socket activation support" ON) option(WITH_GCRYPT "Search for libgcrypt to support additional authentication methods in LibVNCClient" ON) +option(WITH_FFMPEG "Search for FFMPEG to build an example VNC to MPEG encoder" ON) option(WITH_TIGHTVNC_FILETRANSFER "Enable filetransfer if there is pthreads support" ON) option(WITH_24BPP "Allow 24 bpp" ON) option(WITH_IPv6 "Enable IPv6 Support" ON) @@ -126,6 +128,10 @@ if(WITH_GCRYPT) find_library(LIBGCRYPT_LIBRARIES gcrypt) endif(WITH_GCRYPT) +if(WITH_FFMPEG) + find_package(FFMPEG) +endif(WITH_FFMPEG) + check_include_file("endian.h" LIBVNCSERVER_HAVE_ENDIAN_H) check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H) @@ -452,12 +458,12 @@ if(SDL_FOUND) set(SDLvncviewer_EXTRA_SOURCES scrap.c) endif(SDL_FOUND) -if(HAVE_FFMPEG) +if(FFMPEG_FOUND) set(LIBVNCCLIENT_EXAMPLES ${LIBVNCCLIENT_EXAMPLES} vnc2mpg ) -endif(HAVE_FFMPEG) +endif(FFMPEG_FOUND) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples) -- cgit v1.2.1