diff --git a/CMakeLists.txt b/CMakeLists.txt index a550705d..764c1cf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,8 +164,12 @@ install(TARGETS uvw EXPORT uvwConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} if(FETCH_LIBUV AND BUILD_UVW_LIBS) # libuv is only fetched when both above conditions are true install(DIRECTORY ${libuv_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/uvw/uv/include) - install(TARGETS uv_a EXPORT uvwConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/uvw) - install(TARGETS uv EXPORT uvwConfig LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/uvw) + if (BUILD_UVW_SHARED_LIB) + install(TARGETS uv EXPORT uvwConfig LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/uvw) + else() + install(TARGETS uv_a EXPORT uvwConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/uvw) + endif() + endif(FETCH_LIBUV AND BUILD_UVW_LIBS) ### Testing