From 896ca2036c35b89a7f63e1adefe5e3724bf4d40d Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 19 Jul 2011 13:40:34 +0200 Subject: tightPng: Add initial tightPng encoding support. http://wiki.qemu.org/VNC_Tight_PNG Signed-off-by: Joel Martin Signed-off-by: Christian Beier --- CMakeLists.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a5425cc..bf17aa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/ find_package(ZLIB) find_package(JPEG) +find_package(PNG) find_package(SDL) find_package(GnuTLS) find_package(Threads) @@ -30,6 +31,9 @@ endif(ZLIB_FOUND) if(JPEG_FOUND) set(LIBVNCSERVER_HAVE_LIBJPEG 1) endif(JPEG_FOUND) +if(PNG_FOUND) + set(LIBVNCSERVER_HAVE_LIBPNG 1) +endif(PNG_FOUND) option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON) if(GNUTLS_FOUND) set(LIBVNCSERVER_WITH_CLIENT_TLS 1) @@ -142,12 +146,21 @@ endif(ZLIB_FOUND) if(JPEG_FOUND) add_definitions(-DLIBVNCSERVER_HAVE_LIBJPEG) include_directories(${JPEG_INCLUDE_DIR}) - set(LIBVNCSERVER_SOURCES - ${LIBVNCSERVER_SOURCES} - ${LIBVNCSERVER_DIR}/tight.c - ) + set(TIGHT_C ${LIBVNCSERVER_DIR}/tight.c) endif(JPEG_FOUND) +if(PNG_FOUND) + add_definitions(-DLIBVNCSERVER_HAVE_LIBPNG) + include_directories(${PNG_INCLUDE_DIR}) + set(TIGHT_C ${LIBVNCSERVER_DIR}/tight.c) +endif(PNG_FOUND) + + +set(LIBVNCSERVER_SOURCES + ${LIBVNCSERVER_SOURCES} + ${TIGHT_C} +) + if(TIGHTVNC_FILETRANSFER) set(LIBVNCSERVER_SOURCES ${LIBVNCSERVER_SOURCES} @@ -174,6 +187,7 @@ target_link_libraries(vncserver ${ADDITIONAL_LIBS} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} + ${PNG_LIBRARIES} ${SDL_LIBRARY} ) -- cgit v1.2.3