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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9e0b359c63 dont install static libraries (#11119)
9e0b359c63 is described below

commit 9e0b359c632190d01a948a9121d486fe15e8df61
Author: Chris McFarlen <[email protected]>
AuthorDate: Fri Mar 1 14:05:23 2024 -0600

    dont install static libraries (#11119)
---
 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(

Reply via email to