Skip to content
Snippets Groups Projects
Commit 053dbcb6 authored by Rosen Matev's avatar Rosen Matev :sunny: Committed by Miroslav Saur
Browse files

Use pkg_config for zstd and make it private (cherry-pick !4507)

parent 94386cd6
No related branches found
No related tags found
2 merge requests!4782Use pkg_config for zstd and make it private (cherry-pick !4507),!4774Synchronize master branch with 2024-patches
......@@ -54,7 +54,7 @@ gaudi_add_module(MDF
LHCb::MDFLib
PRIVATE
ROOT::Core
zstd::zstd
PkgConfig::zstd
)
gaudi_add_tests(QMTest)
###############################################################################
# (c) Copyright 2024 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
# - Find zstd
# Find the zstd compression library and includes
#
# ZSTD_INCLUDE_DIRS - where to find zstd.h, etc.
# ZSTD_LIBRARIES - List of libraries when using zstd.
# ZSTD_FOUND - True if zstd found.
find_path(ZSTD_INCLUDE_DIRS
NAMES zstd.h
HINTS ${zstd_ROOT_DIR}/include)
find_library(ZSTD_LIBRARIES
NAMES zstd
HINTS ${zstd_ROOT_DIR}/lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS)
mark_as_advanced(
ZSTD_LIBRARIES
ZSTD_INCLUDE_DIRS)
if(ZSTD_FOUND AND NOT (TARGET zstd::zstd))
add_library (zstd::zstd UNKNOWN IMPORTED)
set_target_properties(zstd::zstd
PROPERTIES
IMPORTED_LOCATION ${ZSTD_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIRS})
endif()
......@@ -119,7 +119,6 @@ find_package(Vc 1.4.1 REQUIRED)
find_package(VDT REQUIRED)
find_package(XercesC REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(zstd REQUIRED)
find_package(PkgConfig)
pkg_check_modules(git2 libgit2 REQUIRED IMPORTED_TARGET) # for GitEntityResolver
......@@ -134,6 +133,7 @@ find_data_package(TCK/HltTCK REQUIRED)
# -- Private dependencies
if(WITH_LHCb_PRIVATE_DEPENDENCIES)
pkg_check_modules(zstd libzstd REQUIRED IMPORTED_TARGET)
if(BUILD_TESTING)
find_package(Boost 1.62 REQUIRED unit_test_framework)
find_package(ROOT 6.20 REQUIRED Tree)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment