From: DRC Date: Tue, 7 Jun 2011 01:55:12 +0000 (+0000) Subject: Don't need to save the value of CMAKE_REQUIRED_FLAGS or CMAKE_REQUIRED_LIBRARIES X-Git-Tag: v1.1.90~313 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fe06e6147177a288aa61fb3cce1f487fb6961a71;p=tigervnc.git Don't need to save the value of CMAKE_REQUIRED_FLAGS or CMAKE_REQUIRED_LIBRARIES git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4467 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 15b458b9..ee206afc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,13 +166,14 @@ endif() find_package(JPEG REQUIRED) # Warn if it doesn't seem to be the accelerated libjpeg that's found -set(CMAKE_REQUIRED_LIBRARIES_OLD ${CMAKE_REQUIRED_LIBRARIES}) -set(CMAKE_REQUIRED_FLAGS_OLD ${CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES}) set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR}) + check_c_source_compiles("#include \n#include \nint main(int c, char** v) { return JCS_EXT_RGBX; }" FOUND_JPEG_TURBO) -set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_OLD}) -set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_OLD}) + +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_FLAGS) + if(NOT FOUND_JPEG_TURBO) message(STATUS "WARNING: You are not using libjpeg-turbo. Performance will suffer.") endif()