From c393504556a335813d62235ec3096ff8d1462bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 5 Jun 2022 11:19:11 +0800 Subject: [PATCH] add static lib --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71422b8..b8e8374 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,18 +16,25 @@ ENDIF() IF(CMAKE_SIZEOF_VOID_P EQUAL 8) add_library(libbase16384 SHARED base1464.c) + add_library(libbase16384_s STATIC base1464.c) ELSE() add_library(libbase16384 SHARED base1432.c) + add_library(libbase16384_s STATIC base1432.c) ENDIF() set_target_properties(libbase16384 PROPERTIES OUTPUT_NAME base16384 VERSION 2.2.0 ) +set_target_properties(libbase16384_s PROPERTIES + OUTPUT_NAME base16384 + VERSION 2.2.0 + ) -target_link_libraries(base16384 libbase16384) +target_link_libraries(base16384 libbase16384_s) INSTALL(TARGETS base16384 RUNTIME DESTINATION bin) INSTALL(TARGETS libbase16384 LIBRARY DESTINATION lib) +INSTALL(TARGETS libbase16384_s LIBRARY DESTINATION lib) INSTALL(FILES base16384.h DESTINATION include) -INSTALL(FILES base16384.1 DESTINATION share/man/man1) \ No newline at end of file +INSTALL(FILES base16384.1 DESTINATION share/man/man1)