diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-03-04 14:31:32 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-03-04 14:31:32 +0000 |
commit | d027edd44167fd2f038e5d06e9099fb6500587c5 (patch) | |
tree | 8b26243f731b3b0d37fe8beb1dd090920bc37184 | |
parent | 6fa0749aa720549ee25a855c6e408221fb7a6180 (diff) | |
download | tigervnc-d027edd44167fd2f038e5d06e9099fb6500587c5.tar.gz tigervnc-d027edd44167fd2f038e5d06e9099fb6500587c5.zip |
Restore workaround for CMake's broken 64-bit detection, but in a more
generic manner.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4322 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c25f18ee..15b1d5cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,14 @@ if(NOT DEFINED BUILD_WINVNC) endif() endif() +# CMake 64-bit detection leaves a bit to be desired and is sometimes +# not properly set. Specifically we see this with mingw64. Try to +# detect this scenario and fix things. +if(NOT CMAKE_CL_64 AND CMAKE_SIZEOF_VOID_P MATCHES 8) + message(STATUS "WARNING: CMake misdetected 64-bit build. Fixing...") + set(CMAKE_CL_64 1) +endif() + if(MSVC) # Use the static C library for all build types foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE |