Release prep. Add support for pkgconfig in cmake, set versions appropriately

pull/184/head
Brad House 7 years ago
parent a915d0adc6
commit ca9ccb9395
  1. 13
      CMakeLists.txt
  2. 2
      Makefile.am
  3. 3
      RELEASE-PROCEDURE.md
  4. 6
      ares_version.h
  5. 3
      configure.ac
  6. 20
      libcares.pc.cmake
  7. 2
      test/Makefile.am

@ -11,6 +11,9 @@ INCLUDE (GNUInstallDirs)
PROJECT (c-ares C)
# Set this version before release
SET (CARES_VERSION "1.14.0")
# This is for libtool compatibility, and specified in a form that is easily
# translatable from libtool (even if the actual form doesn't make sense).
# For instance, in an autotools project, in Makefile.am there is a line that
@ -649,6 +652,16 @@ IF (CARES_INSTALL)
)
INSTALL (EXPORT ${PROJECT_NAME}-targets DESTINATION ${CMAKECONFIG_INSTALL_DIR} NAMESPACE ${PROJECT_NAME}::)
INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR})
# pkgconfig support
IF (NOT CARES_SHARED)
SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB")
FOREACH (LIB ${CARES_DEPENDENT_LIBS})
SET (CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS} -l${LIB}")
ENDFOREACH ()
ENDIF ()
CONFIGURE_FILE("libcares.pc.cmake" "libcares.pc" @ONLY)
INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
ENDIF ()
# Legacy chain-building variables (provided for compatibility with old code).

@ -58,7 +58,7 @@ EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
TODO ares_build.h.in cares.rc README.msvc $(MSVCFILES) \
$(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 INSTALL.md \
CMakeLists.txt ares_build.h.cmake ares_config.h.cmake c-ares-config.cmake.in \
README.md LICENSE.md RELEASE-PROCEDURE.md
libcares.pc.cmake README.md LICENSE.md RELEASE-PROCEDURE.md
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)

@ -6,6 +6,9 @@ in the source code repo
- edit `RELEASE-NOTES` to be accurate
- edit `configure.ac` and `CMakeLists.txt` to set the current version.
This is used to generate libcares.pc, otherwise it would not be necessary.
- edit `Makefile.am`'s `CARES_VERSION_INFO`, and `CMakeLists.txt`'s
`CARES_LIB_VERSIONINFO` set to the same value to denote the current shared
object versioning.

@ -6,12 +6,12 @@
#define ARES_COPYRIGHT "2004 - 2017 Daniel Stenberg, <daniel@haxx.se>."
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 13
#define ARES_VERSION_PATCH 1
#define ARES_VERSION_MINOR 14
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.13.1-DEV"
#define ARES_VERSION_STR "1.14.0"
#if (ARES_VERSION >= 0x010700)
# define CARES_HAVE_ARES_LIBRARY_INIT 1

@ -1,7 +1,6 @@
AC_PREREQ(2.57)
dnl Version not hardcoded here. Fetched later from ares_version.h
AC_INIT([c-ares], [-],
AC_INIT([c-ares], [1.14.0],
[c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares])
XC_OVR_ZZ50

@ -0,0 +1,20 @@
#***************************************************************************
# Project ___ __ _ _ __ ___ ___
# / __|____ / _` | '__/ _ \/ __|
# | (_|_____| (_| | | | __/\__ \
# \___| \__,_|_| \___||___/
#
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: c-ares
URL: https://c-ares.haxx.se/
Description: asynchronous DNS lookup library
Version: @VERSION@
Requires:
Requires.private:
Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
Libs: -L${libdir} -lcares
Libs.private: @CARES_PRIVATE_LIBS@

@ -15,7 +15,7 @@ include Makefile.inc
TESTS = arestest fuzzcheck.sh
noinst_PROGRAMS = arestest aresfuzz aresfuzzname dnsdump
EXTRA_DIST = fuzzcheck.sh
EXTRA_DIST = fuzzcheck.sh CMakeLists.txt
arestest_SOURCES = $(TESTSOURCES) $(TESTHEADERS)
arestest_LDADD = libgmock.la $(ARES_BLD_DIR)/libcares.la $(PTHREAD_LIBS)

Loading…
Cancel
Save