From 4dce4c49194103935c0c550be045f27672d821e7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 12 Aug 2014 15:23:12 -0700 Subject: [PATCH] link to ws2_32.lib if LibOVR is being linked to --- cmake/modules/FindLibOVR.cmake | 2 ++ interface/CMakeLists.txt | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/modules/FindLibOVR.cmake b/cmake/modules/FindLibOVR.cmake index 9c703f9cfe..62ac572f2f 100644 --- a/cmake/modules/FindLibOVR.cmake +++ b/cmake/modules/FindLibOVR.cmake @@ -63,6 +63,8 @@ if (APPLE) elseif (UNIX) list(APPEND LIBOVR_LIBRARIES "${UDEV_LIBRARY}" "${XINERAMA_LIBRARY}") list(APPEND LIBOVR_ARGS_LIST UDEV_LIBRARY XINERAMA_LIBRARY) +elseif (WIN32) + list(APPEND LIBOVR_LIBRARIES ws2_32.lib) endif () include(FindPackageHandleStandardArgs) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index fefdcb0ab5..32070a4427 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -201,9 +201,6 @@ else (APPLE) add_definitions(-DGLEW_STATIC) target_link_libraries(${TARGET_NAME} "${GLEW_LIBRARIES}" wsock32.lib opengl32.lib) - if (LIBOVR_FOUND) - target_link_libraries(${TARGET_NAME} ws2_32.lib) - endif() endif() endif (APPLE)