]> source.dussan.org Git - tigervnc.git/commitdiff
Move ws2_32 dependency to the correct place
authorPierre Ossman <ossman@cendio.se>
Fri, 17 Oct 2014 11:54:32 +0000 (13:54 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 17 Oct 2014 11:54:32 +0000 (13:54 +0200)
It is rdr and network that needs it, not vncviewer.

common/network/CMakeLists.txt
common/rdr/CMakeLists.txt
vncviewer/CMakeLists.txt

index ddde5745d042a70d8d695ba0e001b40df45b58d1..b624c8e6b7d7b98e177df0801d6808f123e1ea1b 100644 (file)
@@ -3,6 +3,10 @@ include_directories(${CMAKE_SOURCE_DIR}/common)
 add_library(network STATIC
   TcpSocket.cxx)
 
+if(WIN32)
+       target_link_libraries(network ws2_32)
+endif()
+
 if(UNIX)
   libtool_create_control_file(network)
 endif()
index ee71a9bbfd5d8559842640d854660297ba4fddc7..cc45f9112fa94ded79d215da654699c87b654a13 100644 (file)
@@ -17,9 +17,9 @@ add_library(rdr STATIC
 set(RDR_LIBRARIES ${ZLIB_LIBRARIES} os)
 if(GNUTLS_FOUND)
   set(RDR_LIBRARIES ${RDR_LIBRARIES} ${GNUTLS_LIBRARIES})
-  if(WIN32)
+endif()
+if(WIN32)
        set(RDR_LIBRARIES ${RDR_LIBRARIES} ws2_32)
-  endif()
 endif()
 
 target_link_libraries(rdr ${RDR_LIBRARIES})
index beca98d16f97cc96b4918fe63ef7c7a23ce459f9..c6e778f11ebe3d6a4e9e40ddd00bc9e6a92de660 100644 (file)
@@ -48,13 +48,6 @@ endif()
 
 target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
 
-# 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 AND WIN32)
-  target_link_libraries(vncviewer ws2_32)
-endif()
-
 install(TARGETS vncviewer DESTINATION ${BIN_DIR})
 if(UNIX)
   install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1)