diff options
author | Rich Wareham <rjw57@cantab.net> | 2014-02-26 17:49:58 +0000 |
---|---|---|
committer | Rich Wareham <rjw57@cantab.net> | 2014-02-26 17:49:58 +0000 |
commit | 8b94f34cedb85fac0d058e7e678b623a8aac3cd8 (patch) | |
tree | 60287b4e5a7f2f84c416d421fa3d57232dccc795 | |
parent | badf94eb330bdc72e4b4e6481b86b8fea2e9fa23 (diff) | |
parent | 8975e143d4ae6b7ee4116bcdb60c33d7be87be16 (diff) | |
download | rneovim-8b94f34cedb85fac0d058e7e678b623a8aac3cd8.tar.gz rneovim-8b94f34cedb85fac0d058e7e678b623a8aac3cd8.tar.bz2 rneovim-8b94f34cedb85fac0d058e7e678b623a8aac3cd8.zip |
Merge pull request #172 from rjw57/issue-171
use shared libuv library if not using the bundled version
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cmake/FindLibUV.cmake | 12 |
2 files changed, 12 insertions, 2 deletions
@@ -1,6 +1,6 @@ -include local.mk -CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=.deps/usr +CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=.deps/usr -DLibUV_USE_STATIC=YES # Extra CMake flags which extend the default set CMAKE_EXTRA_FLAGS := diff --git a/cmake/FindLibUV.cmake b/cmake/FindLibUV.cmake index d0cedfb37d..fff3823c62 100644 --- a/cmake/FindLibUV.cmake +++ b/cmake/FindLibUV.cmake @@ -4,6 +4,9 @@ # LibUV_FOUND - system has libuv # LibUV_INCLUDE_DIRS - the libuv include directories # LibUV_LIBRARIES - link these to use libuv +# +# Set the LibUV_USE_STATIC variable to specify if static libraries should +# be preferred to shared ones. include(LibFindMacros) @@ -12,9 +15,16 @@ find_path(LibUV_INCLUDE_DIR NAMES uv.h ) +set(_uv_names uv) + +# If we're asked to use static linkage, add libuv.a as a preferred library name. +if(LibUV_USE_STATIC) + list(INSERT _uv_names 0 libuv.a) +endif(LibUV_USE_STATIC) + # The library itself. Note that we prefer the static version. find_library(LibUV_LIBRARY - NAMES libuv.a uv + NAMES ${_uv_names} ) # Set the include dir variables and the libraries and let libfind_process do the rest. |