build,cmake: Change installation location on MinGW

MinGW prefers a POSIX like file system hierarchy. Therefore, it is appropriate
that the installation destination is the same as UNIX.

PR-URL: https://github.com/libuv/libuv/pull/2697
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
erw7 2020-02-24 15:47:11 +09:00 committed by Jameson Nash
parent 12be29f185
commit 66632e7a44

View File

@ -546,7 +546,7 @@ if(LIBUV_BUILD_TESTS)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(UNIX)
if(UNIX OR MINGW)
# Now for some gibbering horrors from beyond the stars...
foreach(lib IN LISTS uv_libraries)
list(APPEND LIBS "-l${lib}")
@ -573,7 +573,7 @@ if(UNIX)
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(WIN32)
if(MSVC)
install(DIRECTORY include/ DESTINATION include)
install(FILES LICENSE DESTINATION .)
install(TARGETS uv uv_a