diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2ab6d17e..9292e6a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -365,38 +365,26 @@ if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
   list(APPEND uv_test_libraries util)
 endif()

-add_library(uv SHARED ${uv_sources})
+add_library(uv ${uv_sources})
 target_compile_definitions(uv
-                           INTERFACE USING_UV_SHARED=1
-                           PRIVATE ${uv_defines} BUILDING_UV_SHARED=1)
+  PRIVATE
+    ${uv_defines}
+)
+get_target_property(target_type uv TYPE)
+if (target_type STREQUAL "SHARED_LIBRARY")
+  target_compile_definitions(uv
+    INTERFACE
+      USING_UV_SHARED=1
+    PRIVATE
+      BUILDING_UV_SHARED=1
+  )
+else()
+  set_property(TARGET uv PROPERTY OUTPUT_NAME "uv_a")
+endif()
 target_compile_options(uv PRIVATE ${uv_cflags})
 target_include_directories(uv PUBLIC include PRIVATE src)
 target_link_libraries(uv ${uv_libraries})

-add_library(uv_a STATIC ${uv_sources})
-target_compile_definitions(uv_a PRIVATE ${uv_defines})
-target_compile_options(uv_a PRIVATE ${uv_cflags})
-target_include_directories(uv_a PUBLIC include PRIVATE src)
-target_link_libraries(uv_a ${uv_libraries})
-
-if(LIBUV_BUILD_TESTS)
-  add_executable(uv_run_tests ${uv_test_sources})
-  target_compile_definitions(uv_run_tests
-                             PRIVATE ${uv_defines} USING_UV_SHARED=1)
-  target_compile_options(uv_run_tests PRIVATE ${uv_cflags})
-  target_link_libraries(uv_run_tests uv ${uv_test_libraries})
-  add_test(NAME uv_test
-           COMMAND uv_run_tests
-           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-  add_executable(uv_run_tests_a ${uv_test_sources})
-  target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
-  target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
-  target_link_libraries(uv_run_tests_a uv_a ${uv_test_libraries})
-  add_test(NAME uv_test_a
-           COMMAND uv_run_tests_a
-           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-endif()
-
 if(UNIX)
   # Now for some gibbering horrors from beyond the stars...
   foreach(x ${uv_libraries})
@@ -411,20 +399,18 @@ if(UNIX)
   set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
   set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
   set(prefix ${CMAKE_INSTALL_PREFIX})
-  configure_file(libuv.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libuv.pc @ONLY)

   install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-  install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libuv.pc
-          DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-  install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-  install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+  install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses)
+  install(TARGETS uv
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()

 if(WIN32)
   install(DIRECTORY include/ DESTINATION include)
-  install(FILES LICENSE DESTINATION .)
-  install(TARGETS uv uv_a
-          RUNTIME DESTINATION lib/$<CONFIG>
-          ARCHIVE DESTINATION lib/$<CONFIG>)
+  install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/licenses)
+  install(TARGETS uv
+    RUNTIME DESTINATION bin
+    ARCHIVE DESTINATION lib)
 endif()
