aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-09-20 19:35:35 -0400
committerJames McCoy <jamessan@jamessan.com>2021-09-20 21:19:52 -0400
commit2435cf77d195df353ca20f811327f9076ab00e38 (patch)
treefe68150289e996e4889a5bda3a3637a9400ce7a0
parent0216aed20c9f5960506155e3d722f5ee5e807720 (diff)
downloadrneovim-2435cf77d195df353ca20f811327f9076ab00e38.tar.gz
rneovim-2435cf77d195df353ca20f811327f9076ab00e38.tar.bz2
rneovim-2435cf77d195df353ca20f811327f9076ab00e38.zip
build: add ${CMAKE_THREAD_LIBS_INIT} to LIBUV_LIBRARIES
This is a workaround for not yet having fully correct Find* cmake modules for static builds. https://github.com/Tronic/cmake-modules/issues/3#issuecomment-624469020
-rw-r--r--cmake/FindLibUV.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake
index 951fb0435e..df3696b2e3 100644
--- a/cmake/FindLibUV.cmake
+++ b/cmake/FindLibUV.cmake
@@ -75,6 +75,13 @@ if(WIN32)
list(APPEND LIBUV_LIBRARIES ws2_32)
endif()
+if(Threads_FOUND)
+ # TODO: Fix the cmake file to properly handle static deps for bundled builds.
+ # Meanwhile just include the threads library if CMake tells us there's one to
+ # use.
+ list(APPEND LIBUV_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBUV_FOUND to TRUE