2 # This file is open source software, licensed to you under the terms
3 # of the Apache License, Version 2.0 (the "License"). See the NOTICE file
4 # distributed with this work for additional information regarding copyright
5 # ownership. You may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing,
12 # software distributed under the License is distributed on an
13 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 # KIND, either express or implied. See the License for the
15 # specific language governing permissions and limitations
20 # Copyright (C) 2019 Scylladb, Ltd.
24 # CMake bundles `FindBoost.cmake`, which is coupled to the Boost version. If
25 # we're on a system without a recent enough version of `FindBoost.cmake`, then
26 # we need to use the one bundled with Seastar.
28 # The "real" FIND_PACKAGE invocation for Boost is inside SEASTAR_FIND_DEPENDENCIES.
31 # Be consistent in results from FindBoost.cmake.
32 # This is required because cmake-boost may return to Boost_{component}_LIBRARY:
33 # - /usr/lib64/libboost_foo.so
35 set (Boost_NO_BOOST_CMAKE ON)
37 # This is the minimum version of Boost we need the CMake-bundled `FindBoost.cmake` to know about.
38 find_package (Boost 1.64 MODULE)
41 # Iterate through the dependency list defined below and execute `find_package`
42 # with the corresponding configuration for each 3rd-party dependency.
44 macro (seastar_find_dependencies)
46 # List of Seastar dependencies that is meant to be used
47 # both in Seastar configuration and by clients which
48 # consume Seastar via SeastarConfig.cmake.
50 set (_seastar_all_dependencies
51 # Public dependencies.
55 dpdk # No version information published.
58 # Private and private/public dependencies.
65 lksctp-tools # No version information published.
66 numactl # No version information published.
70 # Arguments to `find_package` for each 3rd-party dependency.
71 # Note that the version specification is a "minimal" version requirement.
73 # `unit_test_framework` is not required in the case we are building Seastar
74 # without the testing library, however the component is always specified as required
75 # to keep the CMake code minimalistic and easy-to-use.
76 set (_seastar_dep_args_Boost
85 set (_seastar_dep_args_c-ares 1.13 REQUIRED)
86 set (_seastar_dep_args_cryptopp 5.6.5 REQUIRED)
87 set (_seastar_dep_args_fmt 5.0.0 REQUIRED)
88 set (_seastar_dep_args_lz4 1.7.3 REQUIRED)
89 set (_seastar_dep_args_GnuTLS 3.3.26 REQUIRED)
90 set (_seastar_dep_args_StdAtomic REQUIRED)
91 set (_seastar_dep_args_hwloc 1.11.2)
92 set (_seastar_dep_args_lksctp-tools REQUIRED)
93 set (_seastar_dep_args_rt REQUIRED)
94 set (_seastar_dep_args_yaml-cpp 0.5.1 REQUIRED)
96 foreach (third_party ${_seastar_all_dependencies})
97 find_package ("${third_party}" ${_seastar_dep_args_${third_party}})