mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
Change to not use library prefix on MSVC
This commit is contained in:
parent
655e3167ee
commit
d337965e09
@ -31,11 +31,7 @@ if(LIBUV_USE_STATIC)
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
endif(LIBUV_USE_STATIC)
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND LIBUV_NAMES libuv)
|
||||
else()
|
||||
list(APPEND LIBUV_NAMES uv)
|
||||
endif()
|
||||
list(APPEND LIBUV_NAMES uv)
|
||||
|
||||
find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES}
|
||||
HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS}
|
||||
|
18
third-party/cmake/LibuvCMakeLists.txt
vendored
18
third-party/cmake/LibuvCMakeLists.txt
vendored
@ -4,18 +4,12 @@ project(libuv LANGUAGES C)
|
||||
file(GLOB UV_SOURCES_COMMON src/*.c)
|
||||
file(GLOB UV_SOURCES_WIN src/win/*.c)
|
||||
|
||||
if(MSVC)
|
||||
set(LIBUV libuv)
|
||||
else()
|
||||
set(LIBUV uv)
|
||||
endif()
|
||||
|
||||
add_library(${LIBUV} ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
|
||||
target_compile_definitions(${LIBUV} PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
|
||||
target_link_libraries(${LIBUV} iphlpapi psapi shell32 userenv ws2_32)
|
||||
target_include_directories(${LIBUV} PUBLIC ./include PRIVATE ./src)
|
||||
add_library(uv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN})
|
||||
target_compile_definitions(uv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600")
|
||||
target_link_libraries(uv iphlpapi psapi shell32 userenv ws2_32)
|
||||
target_include_directories(uv PUBLIC ./include PRIVATE ./src)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(${LIBUV} PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED)
|
||||
set_target_properties(uv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED)
|
||||
endif()
|
||||
|
||||
install(FILES
|
||||
@ -28,7 +22,7 @@ install(FILES
|
||||
DESTINATION include)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS ${LIBUV}
|
||||
install(TARGETS uv
|
||||
PUBLIC_HEADER
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
Loading…
Reference in New Issue
Block a user