]> source.dussan.org Git - tigervnc.git/commitdiff
Check that we are using libjpeg-turbo and not the standard one and complain
authorPierre Ossman <ossman@cendio.se>
Fri, 4 Mar 2011 11:35:24 +0000 (11:35 +0000)
committerPierre Ossman <ossman@cendio.se>
Fri, 4 Mar 2011 11:35:24 +0000 (11:35 +0000)
to the user if not.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4321 3789f03b-4d11-0410-bbf8-ca57d06f2519

CMakeLists.txt

index a831ad06ddc7cbae2b265899b827375cb0597b02..c25f18eecc85636a8450909c0d7b1220fa9288d0 100644 (file)
@@ -98,6 +98,13 @@ endif()
 # Check for libjpeg
 find_package(JPEG REQUIRED)
 
+# Warn if it doesn't seem to be the accelerated libjpeg that's found
+include(CheckCSourceCompiles)
+check_c_source_compiles("#include <stdio.h>\n#include <jpeglib.h>\nint main(int c, char** v) { return JCS_EXT_RGBX; }" FOUND_JPEG_TURBO)
+if(NOT FOUND_JPEG_TURBO)
+  message(STATUS "WARNING: You are not using libjpeg-turbo. Performance will suffer.")
+endif()
+
 # Check for GNUTLS library
 find_package(GnuTLS)
 if(GNUTLS_FOUND)