@@ -8,10 +8,10 @@ INCLUDE (CheckCSourceCompiles)
8
8
INCLUDE (CheckStructHasMember)
9
9
INCLUDE (CheckLibraryExists)
10
10
11
- PROJECT (c-ares LANGUAGES C VERSION "1.18 .0" )
11
+ PROJECT (c-ares LANGUAGES C VERSION "1.19 .0" )
12
12
13
13
# Set this version before release
14
- SET (CARES_VERSION "1.18.1 " )
14
+ SET (CARES_VERSION "1.19.0 " )
15
15
16
16
INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong.
17
17
@@ -26,7 +26,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
26
26
# For example, a version of 4:0:2 would generate output such as:
27
27
# libname.so -> libname.so.2
28
28
# libname.so.2 -> libname.so.2.2.0
29
- SET (CARES_LIB_VERSIONINFO "7:1:5 " )
29
+ SET (CARES_LIB_VERSIONINFO "8:0:6 " )
30
30
31
31
32
32
OPTION (CARES_STATIC "Build as a static library" OFF )
@@ -82,9 +82,14 @@ SET (TARGETS_INST_DEST
82
82
83
83
# Function in Library
84
84
# CHECK_LIBRARY_EXISTS can't be used as it will return true if the function
85
- # is found in a different dependent library.
85
+ # is found in a different required/ dependent library.
86
86
MACRO (CARES_FUNCTION_IN_LIBRARY func lib var)
87
+
88
+ SET (_ORIG_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} " )
89
+ SET (CMAKE_REQUIRED_LIBRARIES )
87
90
CHECK_FUNCTION_EXISTS ("${func} " "_CARES_FUNC_IN_LIB_GLOBAL_${func} " )
91
+ SET (CMAKE_REQUIRED_LIBRARIES "${_ORIG_CMAKE_REQUIRED_LIBRARIES} " )
92
+
88
93
IF ("${_CARES_FUNC_IN_LIB_GLOBAL_${func} }" )
89
94
SET (${var} FALSE )
90
95
ELSE ()
@@ -689,6 +694,12 @@ IF (CARES_INSTALL)
689
694
if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
690
695
691
696
if ( "${CPACK_PACKAGE_ARCHITECTURE} " STREQUAL "" )
697
+ set ( CPACK_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR} " )
698
+ endif ()
699
+ if ( "${CPACK_PACKAGE_ARCHITECTURE} " STREQUAL "" )
700
+ if ( "${CMAKE_HOST_SYSTEM_NAME} " STREQUAL "Windows" )
701
+ message ( FATAL_ERROR "Failed to determine CPACK_PACKAGE_ARCHITECTURE. Is CMAKE_SYSTEM_PROCESSOR set?" )
702
+ endif ()
692
703
# Note: the architecture should default to the local architecture, but it
693
704
# in fact comes up empty. We call `uname -m` to ask the kernel instead.
694
705
EXECUTE_PROCESS ( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE )
0 commit comments