summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-10-12 20:00:55 +0000
committerDRC <dcommander@users.sourceforge.net>2011-10-12 20:00:55 +0000
commit3080ec406527bc274969f2b7a25fcefc4520ece5 (patch)
tree5ac580505600dbb25cf879191353308ba3d84398 /CMakeLists.txt
parente8b16be85646641d80ee4cd7c5a9bda90bbbc0a4 (diff)
downloadtigervnc-3080ec406527bc274969f2b7a25fcefc4520ece5.tar.gz
tigervnc-3080ec406527bc274969f2b7a25fcefc4520ece5.zip
Enable WinVNC build with MinGW and MinGW64
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4723 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebf2e539..15394d6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,11 +66,7 @@ message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
add_definitions(-D__BUILD__="${BUILD}")
if(NOT DEFINED BUILD_WINVNC)
- if(MSVC)
- set(BUILD_WINVNC 1)
- else()
- set(BUILD_WINVNC 0)
- endif()
+ set(BUILD_WINVNC 1)
endif()
if(MSVC)
@@ -168,6 +164,14 @@ if(MINGW)
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff <SOURCE>")
endif()
+# MinGW64 has header support but no library support for IActiveDesktop, so we
+# need to check for both the header and library and use our own implementation
+# in common/os if either doesn't exist. MSVC should have both.
+if(WIN32)
+ check_c_source_compiles("#include <windows.h>\n#include <wininet.h>\n#include <shlobj.h>\nint main(int c, char** v) {IActiveDesktop iad; return 0;}" HAVE_ACTIVE_DESKTOP_H)
+ check_c_source_compiles("#include <windows.h>\n#include <wininet.h>\n#include <shlobj.h>\nint main(int c, char** v) {GUID i = CLSID_ActiveDesktop; return 0;}" HAVE_ACTIVE_DESKTOP_L)
+endif()
+
# X11 stuff. It's in a if() so that we can say REQUIRED
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)