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

bneradt 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 a0c216f677 Fix external libswoc builds (#11179)
a0c216f677 is described below

commit a0c216f6771ab3f4cfc77127b09fe9eafca93acc
Author: Brian Neradt <[email protected]>
AuthorDate: Thu Mar 21 16:52:01 2024 -0500

    Fix external libswoc builds (#11179)
    
    This fixes builds against external libswoc rather than the local ATS
    lib/swoc code.
---
 cmake/add_atsplugin.cmake     | 6 ++++--
 src/proxy/hdrs/CMakeLists.txt | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cmake/add_atsplugin.cmake b/cmake/add_atsplugin.cmake
index dae6a4c027..1412ebb8b4 100644
--- a/cmake/add_atsplugin.cmake
+++ b/cmake/add_atsplugin.cmake
@@ -23,8 +23,10 @@ function(add_atsplugin name)
     target_link_libraries(${name} PRIVATE ts::tsapi ts::tsutil)
   else()
     target_include_directories(
-      ${name} PRIVATE "$<TARGET_PROPERTY:libswoc::libswoc,INCLUDE_DIRECTORIES>"
-                      
"$<TARGET_PROPERTY:yaml-cpp::yaml-cpp,INCLUDE_DIRECTORIES>"
+      ${name}
+      PRIVATE "$<TARGET_PROPERTY:libswoc::libswoc,INCLUDE_DIRECTORIES>"
+              
"$<TARGET_PROPERTY:libswoc::libswoc,INTERFACE_INCLUDE_DIRECTORIES>"
+              "$<TARGET_PROPERTY:yaml-cpp::yaml-cpp,INCLUDE_DIRECTORIES>"
     )
   endif()
   set_target_properties(${name} PROPERTIES PREFIX "")
diff --git a/src/proxy/hdrs/CMakeLists.txt b/src/proxy/hdrs/CMakeLists.txt
index 9c3a2fb53f..34f4c2715f 100644
--- a/src/proxy/hdrs/CMakeLists.txt
+++ b/src/proxy/hdrs/CMakeLists.txt
@@ -51,11 +51,11 @@ if(BUILD_TESTING)
     unit_tests/test_URL.cc
     unit_tests/unit_test_main.cc
   )
-  target_link_libraries(test_proxy_hdrs PRIVATE ts::hdrs ts::tscore 
ts::inkevent catch2::catch2)
+  target_link_libraries(test_proxy_hdrs PRIVATE ts::hdrs ts::tscore 
ts::inkevent libswoc::libswoc catch2::catch2)
   add_test(NAME test_proxy_hdrs COMMAND test_proxy_hdrs)
 
   add_executable(test_proxy_hdrs_xpack unit_tests/test_XPACK.cc)
-  target_link_libraries(test_proxy_hdrs_xpack PRIVATE ts::hdrs ts::tscore 
ts::tsutil libswoc catch2::catch2)
+  target_link_libraries(test_proxy_hdrs_xpack PRIVATE ts::hdrs ts::tscore 
ts::tsutil libswoc::libswoc catch2::catch2)
   add_test(NAME test_proxy_hdrs_xpack COMMAND test_proxy_hdrs_xpack)
 endif()
 

Reply via email to