You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/03/05 15:33:29 UTC

(trafficserver) 05/08: dont install static libraries (#11119)

This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit c0e1046acd75c3fe138abc155bca9230de74e543
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Fri Mar 1 14:05:23 2024 -0600

    dont install static libraries (#11119)
    
    (cherry picked from commit 9e0b359c632190d01a948a9121d486fe15e8df61)
---
 src/api/CMakeLists.txt    |  6 ------
 src/tsutil/CMakeLists.txt | 14 ++++++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt
index 9ed47c14c8..3a7f056235 100644
--- a/src/api/CMakeLists.txt
+++ b/src/api/CMakeLists.txt
@@ -51,12 +51,6 @@ install(
   PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ts
 )
 
-install(
-  TARGETS tsapibackend
-  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-)
-
 if(APPLE)
   target_link_options(tsapi PRIVATE -undefined dynamic_lookup)
 endif()
diff --git a/src/tsutil/CMakeLists.txt b/src/tsutil/CMakeLists.txt
index a747431daa..0cd0ab8fd4 100644
--- a/src/tsutil/CMakeLists.txt
+++ b/src/tsutil/CMakeLists.txt
@@ -55,12 +55,14 @@ add_library(ts::tsutil ALIAS tsutil)
 set_target_properties(tsutil PROPERTIES POSITION_INDEPENDENT_CODE TRUE PUBLIC_HEADER "${TSUTIL_PUBLIC_HEADERS}")
 target_link_libraries(tsutil PUBLIC libswoc::libswoc yaml-cpp::yaml-cpp PkgConfig::PCRE2)
 
-install(
-  TARGETS tsutil
-  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tsutil
-)
+if(BUILD_SHARED_LIBS)
+  install(
+    TARGETS tsutil
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tsutil
+  )
+endif()
 
 if(BUILD_TESTING)
   add_executable(