aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-12-02 16:03:43 -0500
committerJustin M. Keyes <justinkz@gmail.com>2015-12-02 16:03:43 -0500
commit0ee33981e8967bab75427214b432e22ebcf40d6f (patch)
tree6068c2f67029cf551fc3e92d4151cc88405f11fc
parent78e7c4066e61f742933cbb21b12c8d50fc238c63 (diff)
parentf22dfeb00ddc36d33238c8fb650cbcda6572af6b (diff)
downloadrneovim-0ee33981e8967bab75427214b432e22ebcf40d6f.tar.gz
rneovim-0ee33981e8967bab75427214b432e22ebcf40d6f.tar.bz2
rneovim-0ee33981e8967bab75427214b432e22ebcf40d6f.zip
Merge pull request #3666 from sethjackson/libuv-libs
CMake: Don't use check_library_exists for Win32 API libraries in FindLibUV.cmake
-rw-r--r--cmake/FindLibUV.cmake21
1 files changed, 5 insertions, 16 deletions
diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake
index 8542100e67..dcdd5e48b7 100644
--- a/cmake/FindLibUV.cmake
+++ b/cmake/FindLibUV.cmake
@@ -59,11 +59,6 @@ if(HAVE_LIBDL)
list(APPEND LIBUV_LIBRARIES dl)
endif()
-check_library_exists(iphlpapi GetAdaptersAddresses "iphlpapi.h" HAVE_LIBIPHLPAPI)
-if(HAVE_LIBIPHLPAPI)
- list(APPEND LIBUV_LIBRARIES iphlpapi)
-endif()
-
check_library_exists(kstat kstat_lookup "kstat.h" HAVE_LIBKSTAT)
if(HAVE_LIBKSTAT)
list(APPEND LIBUV_LIBRARIES kstat)
@@ -84,11 +79,6 @@ if(HAVE_LIBPERFSTAT)
list(APPEND LIBUV_LIBRARIES perfstat)
endif()
-check_library_exists(psapi GetProcessMemoryInfo "psapi.h" HAVE_LIBPSAPI)
-if(HAVE_LIBPSAPI)
- list(APPEND LIBUV_LIBRARIES psapi)
-endif()
-
check_library_exists(rt clock_gettime "time.h" HAVE_LIBRT)
if(HAVE_LIBRT)
list(APPEND LIBUV_LIBRARIES rt)
@@ -99,13 +89,12 @@ if(HAVE_LIBSENDFILE)
list(APPEND LIBUV_LIBRARIES sendfile)
endif()
-check_library_exists(userenv GetUserProfileDirectoryW "userenv.h" HAVE_LIBUSERENV)
-if(HAVE_LIBUSERENV)
+if(WIN32)
+ # check_library_exists() does not work for Win32 API calls in X86 due to name
+ # mangling calling conventions
+ list(APPEND LIBUV_LIBRARIES iphlpapi)
+ list(APPEND LIBUV_LIBRARIES psapi)
list(APPEND LIBUV_LIBRARIES userenv)
-endif()
-
-check_library_exists(ws2_32 WSAStartup "winsock2.h" HAVE_LIBWS232)
-if(HAVE_LIBWS232)
list(APPEND LIBUV_LIBRARIES ws2_32)
endif()