From ed1ef85063fb399c8afd97afc1da4962cd957158 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 10 Feb 2011 10:43:05 +0000 Subject: Fix MinGW build breakage git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4282 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- win/CMakeLists.txt | 2 -- win/vncviewer/CMakeLists.txt | 12 ++++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'win') diff --git a/win/CMakeLists.txt b/win/CMakeLists.txt index c034f6f6..103520aa 100644 --- a/win/CMakeLists.txt +++ b/win/CMakeLists.txt @@ -1,5 +1,3 @@ -add_definitions(-D_WIN32_IE=0x0500 -D_WIN32_WINNT=0x0500) - include_directories(${CMAKE_SOURCE_DIR}/common ${CMAKE_SOURCE_DIR}/win) configure_file(resdefs.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/resdefs.h) diff --git a/win/vncviewer/CMakeLists.txt b/win/vncviewer/CMakeLists.txt index 863e2d07..7870a01e 100644 --- a/win/vncviewer/CMakeLists.txt +++ b/win/vncviewer/CMakeLists.txt @@ -20,8 +20,16 @@ add_executable(vncviewer WIN32 vncviewer.cxx vncviewer.rc) -target_link_libraries(vncviewer rfb rfb_win32 Xregion network rdr - ws2_32.lib) +set(VNCVIEWER_LIBRARIES rfb rfb_win32 Xregion network rdr) + +# When building with GnuTLS, librdr depends on ws2_32, so in order to make +# MinGW happy, we need to put ws2_32 in librdr's target_link_libraries string, +# not here. +if(NOT GNUTLS_FOUND) + set(VNCVIEWER_LIBRARIES ${VNCVIEWER_LIBRARIES} ws2_32) +endif() + +target_link_libraries(vncviewer ${VNCVIEWER_LIBRARIES}) install(TARGETS vncviewer RUNTIME DESTINATION . -- cgit v1.2.3