summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2017-04-21 14:33:43 +0200
committerChristian Beier <dontmind@freeshell.org>2017-04-21 14:33:43 +0200
commit7ccae55b59d11378b203015d8d2dd33314f22a28 (patch)
tree979675f87f7e638bd8a6dc2d7c0d10d8b8c0e8c1 /CMakeLists.txt
parentecb81d0e758b0bab0e13f10ac874e4d72b98aec0 (diff)
downloadlibtdevnc-7ccae55b59d11378b203015d8d2dd33314f22a28.tar.gz
libtdevnc-7ccae55b59d11378b203015d8d2dd33314f22a28.zip
CMake: include a FindFFMPEG module and use it
Thankfully taken from https://github.com/robotology/ycm/blob/master/find-modules/FindFFMPEG.cmake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
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)