build: fix a problem with the static library name (#12591)

Fix the problem that the static library name was liblibnvim.a in the
environment other than Windows due to the change of bf58c00.
This commit is contained in:
erw7 2020-07-20 01:42:41 +09:00 committed by GitHub
parent daa5bffd93
commit 02bbb8c45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -570,10 +570,16 @@ add_library(
)
set_property(TARGET libnvim APPEND PROPERTY
INCLUDE_DIRECTORIES ${LUA_PREFERRED_INCLUDE_DIRS})
if(MSVC)
set(LIBNVIM_NAME libnvim)
else()
set(LIBNVIM_NAME nvim)
endif()
set_target_properties(
libnvim
PROPERTIES
POSITION_INDEPENDENT_CODE ON
OUTPUT_NAME ${LIBNVIM_NAME}
)
set_property(
TARGET libnvim