Skip to content
Snippets Groups Projects
Commit fae99314 authored by Miroslav Saur's avatar Miroslav Saur
Browse files

Merge branch 'ra-zstd-pkgconfig' into 'master'

Use pkg_config for zstd

Closes #352

See merge request !4507
parents 499d789f a8f38581
No related branches found
No related tags found
1 merge request!4507Use pkg_config for zstd
Pipeline #7447813 passed
......@@ -55,7 +55,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()
......@@ -113,7 +113,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
......@@ -128,6 +127,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 REQUIRED unit_test_framework)
find_package(ROOT 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