diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindLibLUV.cmake | 3 | ||||
-rw-r--r-- | cmake/GetCompileFlags.cmake | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/cmake/FindLibLUV.cmake b/cmake/FindLibLUV.cmake index 784e3fd249..bc53d00f24 100644 --- a/cmake/FindLibLUV.cmake +++ b/cmake/FindLibLUV.cmake @@ -14,7 +14,8 @@ set(LIBLUV_DEFINITIONS ${PC_LIBLUV_CFLAGS_OTHER}) find_path(LIBLUV_INCLUDE_DIR luv/luv.h PATHS ${PC_LIBLUV_INCLUDEDIR} ${PC_LIBLUV_INCLUDE_DIRS}) -list(APPEND LIBLUV_NAMES luv) +# Explicitly look for luv.so. #10407 +list(APPEND LIBLUV_NAMES luv luv${CMAKE_SHARED_LIBRARY_SUFFIX}) find_library(LIBLUV_LIBRARY NAMES ${LIBLUV_NAMES} HINTS ${PC_LIBLUV_LIBDIR} ${PC_LIBLUV_LIBRARY_DIRS}) diff --git a/cmake/GetCompileFlags.cmake b/cmake/GetCompileFlags.cmake index 482eacca16..667b97350c 100644 --- a/cmake/GetCompileFlags.cmake +++ b/cmake/GetCompileFlags.cmake @@ -13,6 +13,11 @@ function(get_compile_flags _compile_flags) get_directory_property(compile_definitions DIRECTORY "src/nvim" COMPILE_DEFINITIONS) + get_target_property(compile_definitions_target nvim COMPILE_DEFINITIONS) + if(compile_definitions_target) + list(APPEND compile_definitions ${compile_definitions_target}) + list(REMOVE_DUPLICATES compile_definitions) + endif() # NOTE: list(JOIN) requires CMake 3.12, string(CONCAT) requires CMake 3. string(REPLACE ";" " -D" compile_definitions "${compile_definitions}") if(compile_definitions) @@ -28,6 +33,11 @@ function(get_compile_flags _compile_flags) get_directory_property(compile_options DIRECTORY "src/nvim" COMPILE_OPTIONS) + get_target_property(compile_options_target nvim COMPILE_OPTIONS) + if(compile_options_target) + list(APPEND compile_options ${compile_options_target}) + list(REMOVE_DUPLICATES compile_options) + endif() # NOTE: list(JOIN) requires CMake 3.12. string(REPLACE ";" " " compile_options "${compile_options}") string(REPLACE |