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

dragon 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 e5fb3931a7 Move find_package() to root build file (#10758)
e5fb3931a7 is described below

commit e5fb3931a7bd3d3f80afc50319b95507b84d7afe
Author: dragon512 <[email protected]>
AuthorDate: Mon Nov 13 09:54:23 2023 -0600

    Move find_package() to root build file (#10758)
---
 CMakeLists.txt            | 6 ++++++
 src/cripts/CMakeLists.txt | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bfa5e6737..cbd79661ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -263,6 +263,12 @@ check_include_file(siginfo.h HAVE_SIGINFO_H)
 check_include_file(endian.h HAVE_ENDIAN_H)
 
 # Find libraries
+if(ENABLE_CRIPTS)
+  # needed for cripts
+  # however this might become a general requirement
+  find_package(fmt 8.1 REQUIRED)
+endif()
+
 find_package(Backtrace)
 if(Backtrace_FOUND)
   set(TS_HAS_BACKTRACE TRUE)
diff --git a/src/cripts/CMakeLists.txt b/src/cripts/CMakeLists.txt
index 52fd650a6e..51ae42cdd9 100644
--- a/src/cripts/CMakeLists.txt
+++ b/src/cripts/CMakeLists.txt
@@ -19,7 +19,6 @@
 
 # We use fmt with cripts, contrary to ATS / libswoc. We also require PCRE2 and 
not PCRE,
 # but hopefully ATS will migrate to PCRE2 soon.
-find_package(fmt 8.1 REQUIRED)
 pkg_check_modules(PCRE2 REQUIRED IMPORTED_TARGET libpcre2-8)
 
 # The source files, globbed so we can drop in local / custom Bundles and 
extensions.

Reply via email to