File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change 1
- # Try to find c-ares library Once done this will define
1
+ #[[ Try to find c-ares library Once done this will define
2
2
#
3
- # c-ares_FOUND - system has c-ares
4
- # C-ARES_INCLUDE_DIRS - The c-ares include directory
3
+ # c-ares_FOUND - system has c-ares
4
+ # C-ARES_INCLUDE_DIRS - The c-ares include directory
5
5
# C-ARES_LIBRARIES - Link these to use c-ares
6
- # c-ares_lib - Imported Targets
6
+ # c-ares - Imported Targets
7
7
#
8
8
# Copyright (c) 2020 antao <antao2002@gmail.com>
9
- #
9
+ #]]
10
10
11
- find_path (C-ARES_INCLUDE_DIRS ares.h )
11
+ find_path (C-ARES_INCLUDE_DIRS NAMES ares.h )
12
12
find_library (C-ARES_LIBRARIES NAMES cares )
13
13
if (C-ARES_INCLUDE_DIRS AND C-ARES_LIBRARIES )
14
- add_library (c-ares_lib INTERFACE IMPORTED )
15
- set_target_properties (c-ares_lib
16
- PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
17
- "${C-ARES_INCLUDE_DIRS}"
18
- INTERFACE_LINK_LIBRARIES
19
- "${C-ARES_LIBRARIES}" )
14
+ add_library (c-ares::cares INTERFACE IMPORTED )
15
+ set_target_properties (
16
+ c-ares::cares
17
+ PROPERTIES
18
+ INTERFACE_INCLUDE_DIRECTORIES "${C-ARES_INCLUDE_DIRS}" INTERFACE_LINK_LIBRARIES "${C-ARES_LIBRARIES}"
19
+ )
20
20
endif ()
21
21
22
22
include (FindPackageHandleStandardArgs )
23
- find_package_handle_standard_args (c-ares
24
- DEFAULT_MSG
25
- C-ARES_INCLUDE_DIRS
26
- C-ARES_LIBRARIES )
23
+ find_package_handle_standard_args (
24
+ c-ares
25
+ DEFAULT_MSG
26
+ C-ARES_INCLUDE_DIRS
27
+ C-ARES_LIBRARIES
28
+ )
27
29
mark_as_advanced (C-ARES_INCLUDE_DIRS C-ARES_LIBRARIES )
You can’t perform that action at this time.
0 commit comments