forked from chenshuo/muduo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmuduo-config.cmake.in
52 lines (45 loc) · 1.52 KB
/
muduo-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# CMake configuration file for muduo
#
# This provides the muduo::muduo target, which you can depend on by adding it
# to your target_link_libraries().
#
# It also defines the following variables, although using these directly is not
# necessary if you use the muduo::muduo target instead.
# MUDUO_INCLUDE_DIR
# MUDUO_LIBRARIES
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set_and_check(MUDUO_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(MUDUO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(MUDUO_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")
# find_dependency() ends up changing PACKAGE_PREFIX_DIR, so save
# muduo's prefix directory in the MUDUO_PREFIX_DIR variable
set(MUDUO_PREFIX_DIR "${PACKAGE_PREFIX_DIR}")
# Include the muduo-targets.cmake file, which is generated from our CMake rules
if (NOT TARGET muduo::muduo)
include("${MUDUO_CMAKE_DIR}/@[email protected]")
endif()
# Set MUDUO_LIBRARIES from our muduo::muduo target
set(${PackageName}_LIBRARIES muduo::muduo)
# Find muduo's dependencies
find_dependency(fmt REQUIRED)
find_dependency(c-ares REQUIRED)
find_dependency(ZLIB REQUIRED)
find_dependency(CURL REQUIRED)
find_dependency(Protobuf REQUIRED)
set(Boost_USE_STATIC_LIBS "@MUDUO_BOOST_LINK_STATIC@")
find_dependency(Boost 1.51.0 MODULE
COMPONENTS
unit_test_framework
context
filesystem
program_options
regex
system
thread
REQUIRED
)
check_required_components("@PROJECT_NAME@")
if (NOT muduo_FIND_QUIETLY)
message(STATUS "Found muduo: ${MUDUO_PREFIX_DIR}")
endif()