Is this really necessary? It makes it more difficult to cross compile. Now
I get:
-- Found JPEG: /usr/i686-pc-mingw32/sys-root/mingw/lib/libjpeg.dll.a
-- Performing Test FOUND_LIBJPEG_TURBO
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the
following cache variables appropriately:
FOUND_LIBJPEG_TURBO_EXITCODE (advanced)
For details see /home/astrand/thin/vnc/tigervnc/trunk/TryRunResults.cmake
-- Performing Test FOUND_LIBJPEG_TURBO - Failed
I can work around this by setting -DFOUND_LIBJPEG_TURBO_EXITCODE=0, but I
don't think it should be this complicated.
Rgds,
Peter
On Thu, 28 Jul 2011, dcomman...@users.sourceforge.net wrote:
Revision: 4602
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4602&view=rev
Author: dcommander
Date: 2011-07-28 08:06:39 +0000 (Thu, 28 Jul 2011)
Log Message:
-----------
Actually link and run the libjpeg-turbo test program to ensure that
JPEG_LIBRARY is set correctly
Modified Paths:
--------------
trunk/CMakeLists.txt
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2011-07-28 07:22:39 UTC (rev 4601)
+++ trunk/CMakeLists.txt 2011-07-28 08:06:39 UTC (rev 4602)
@@ -13,6 +13,7 @@
include(CheckTypeSize)
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
+include(CheckCSourceRuns)
include(CMakeMacroLibtoolFile)
@@ -176,11 +177,28 @@
# Warn if it doesn't seem to be the accelerated libjpeg that's found
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR})
+if(MSVC)
+ set(CMAKE_REQUIRED_DEFINITIONS -MT)
+endif()
-check_c_source_compiles("#include <stdio.h>\n#include <jpeglib.h>\nint main(int c,
char** v) { return JCS_EXT_RGBX; }" FOUND_LIBJPEG_TURBO)
+check_c_source_runs("\n
+ #include <stdio.h>\n
+ #include <jpeglib.h>\n
+ int main(void) {\n
+ struct jpeg_compress_struct cinfo;\n
+ struct jpeg_error_mgr jerr;\n
+ cinfo.err=jpeg_std_error(&jerr);\n
+ jpeg_create_compress(&cinfo);\n
+ cinfo.input_components = 3;\n
+ jpeg_set_defaults(&cinfo);\n
+ cinfo.in_color_space = JCS_EXT_RGB;\n
+ jpeg_default_colorspace(&cinfo);\n
+ return 0;\n
+ }" FOUND_LIBJPEG_TURBO)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_FLAGS)
+set(CMAKE_REQUIRED_DEFINITIONS)
if(NOT FOUND_LIBJPEG_TURBO)
message(STATUS "WARNING: You are not using libjpeg-turbo. Performance will
suffer.")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Tigervnc-commits mailing list
tigervnc-comm...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits
---
Peter Åstrand ThinLinc Chief Developer
Cendio AB http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping Phone: +46-13-21 46 00
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel