bneradt commented on code in PR #10889:
URL: https://github.com/apache/trafficserver/pull/10889#discussion_r1423350974


##########
src/api/CMakeLists.txt:
##########
@@ -52,12 +51,28 @@ target_link_libraries(
 )
 
 # Items that even tscore can depend on
-add_library(tsapicore Metrics.cc DbgCtl.cc)
+set(TSAPICORE_PUBLIC_HEADERS
+    ${PROJECT_SOURCE_DIR}/include/api/Metrics.h
+    ${PROJECT_SOURCE_DIR}/include/api/SourceLocation.h
+    ${PROJECT_SOURCE_DIR}/include/api/DbgCtl.h
+    ${PROJECT_SOURCE_DIR}/include/api/APIHook.h
+    ${PROJECT_SOURCE_DIR}/include/api/APIHooks.h
+    ${PROJECT_SOURCE_DIR}/include/api/FeatureAPIHooks.h
+    ${PROJECT_SOURCE_DIR}/include/api/InkAPIInternal.h
+    ${PROJECT_SOURCE_DIR}/include/api/LifecycleAPIHooks.h
+    ${PROJECT_SOURCE_DIR}/include/api/Metrics.h
+    ${PROJECT_SOURCE_DIR}/include/api/SourceLocation.h
+    ${PROJECT_SOURCE_DIR}/include/api/ts_bw_format.h
+    ${PROJECT_SOURCE_DIR}/include/api/ts_diag_levels.h
+    ${PROJECT_SOURCE_DIR}/include/api/ts_errata.h
+)
+add_library(tsapicore SHARED Assert.cc Metrics.cc DbgCtl.cc SourceLocation.cc 
ts_diags.cc)
 add_library(ts::tsapicore ALIAS tsapicore)
-target_link_libraries(tsapicore PRIVATE ts::tscore)
-set_target_properties(tsapicore PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
+set_target_properties(tsapicore PROPERTIES POSITION_INDEPENDENT_CODE TRUE 
PUBLIC_HEADER "${TSAPICORE_PUBLIC_HEADERS}")
+target_link_libraries(tsapicore PUBLIC libswoc)
 
-install(TARGETS tsapi tsapicore tsapibackend PUBLIC_HEADER DESTINATION 
${CMAKE_INSTALL_INCLUDEDIR}/ts)
+install(TARGETS tsapi tsapibackend PUBLIC_HEADER DESTINATION 
${CMAKE_INSTALL_INCLUDEDIR}/ts)
+install(TARGETS tsapicore PUBLIC_HEADER DESTINATION 
${CMAKE_INSTALL_INCLUDEDIR}/api)

Review Comment:
   Just to make sure I understand this, this is the big change which is the 
goal of this patch, right? `tsapicore` no longer lists `ts::tscore` as a 
dependency, so the circular dependency is removed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to