Skip to content

Commit

Permalink
Merge pull request skywind3000#376 from Homqyy/master
Browse files Browse the repository at this point in the history
同时生成动态库和静态库,安装的时候安装的是动态库
  • Loading branch information
skywind3000 authored Nov 16, 2022
2 parents f553df7 + d06a81a commit fe306fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ include(CTest)
include(GNUInstallDirs)

add_library(kcp STATIC ikcp.c)
add_library(kcp_shared SHARED ikcp.c)

set_property(TARGET kcp_shared PROPERTY LIBRARY_OUTPUT_NAME kcp)

install(FILES ikcp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(TARGETS kcp
install(TARGETS kcp_shared
EXPORT kcp-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
Expand Down

0 comments on commit fe306fc

Please sign in to comment.