cpack
authorMichael Wallner <mike@php.net>
Mon, 14 Dec 2020 12:19:52 +0000 (13:19 +0100)
committerMichael Wallner <mike@php.net>
Mon, 14 Dec 2020 12:19:52 +0000 (13:19 +0100)
20 files changed:
.github/workflows/cmake-build-ci.gen
.github/workflows/cmake-build-ci.yml
CMake/InstallPublicHeaders.cmake
CMake/_Include.cmake
CMakeConfig.txt
CMakeLists.txt
CPack.txt
CPackDEB.txt
CPackFreeBSD.txt [new file with mode: 0644]
CPackRPM.txt
ChangeLog-1.1.md
contrib/bin/memaslap/CMakeLists.txt
docs/CMakeLists.txt
docs/source/ChangeLog-1.1.rst
src/bin/CMakeLists.txt
src/libhashkit/CMakeLists.txt
src/libmemcached/CMakeLists.txt
src/libmemcachedprotocol/CMakeLists.txt
src/libmemcachedutil/CMakeLists.txt
support/CMakeLists.txt

index 1c758836eca17c9ee28e1d5806b4974fedb1c2fb..3101dc78c07ab6bdf961e8fb702284753924a758 100755 (executable)
@@ -183,6 +183,9 @@ function steps_build() {
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
@@ -332,6 +335,8 @@ jobs:
         run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
       - name: Install
         run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
+      - name: Package
+        run: cmake -E chdir build cpack
 
   # release builds
   release:
index 1b45af18a9d73400426542f5888fa8e71b910aa2..2e4009d5806204dfb6decb15030a3b94009cb67c 100644 (file)
@@ -97,6 +97,9 @@ jobs:
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
@@ -174,6 +177,9 @@ jobs:
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
@@ -250,6 +256,9 @@ jobs:
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
@@ -327,6 +336,9 @@ jobs:
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
@@ -368,6 +380,8 @@ jobs:
         run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }}
       - name: Install
         run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }}
+      - name: Package
+        run: cmake -E chdir build cpack
 
   # release builds
   release:
@@ -500,6 +514,9 @@ jobs:
         run: make -C build -j2 test
       - name: Install
         run: make -C build -j2 install DESTDIR=/tmp
+      - name: Package
+        if: ${{ env.CMAKE_BUILD_TYPE == 'Release' && env.CC_VER == 'cur' }}
+        run: make -C build package
       - name: Failed tests log
         if: ${{ failure() }}
         run: cat build/Testing/Temporary/LastTest.log || true
index 2c628158321296177338c4b2383e8e5fbc7b71d6..05629d67458f8855edd28c8fb716c7d9e1351566 100644 (file)
@@ -37,6 +37,7 @@ function(install_public_headers DIRECTORY)
             set(HEADER "${CMAKE_CURRENT_BINARY_DIR}/${HEADER}")
         endif()
         install(FILES ${HEADER}
+                COMPONENT dev
                 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${DIRECTORY}
                 )
     endforeach()
index c75c741f9a8eaa4a304fa2a81fd94d42780b551a..39442dc2901cfc5cd8b6499d85a0de5f64e06088 100644 (file)
@@ -6,7 +6,6 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
 endif()
 
 include(CMakePushCheckState)
-include(GNUInstallDirs)
 include(CMakePackageConfigHelpers)
 
 macro(make_have_identifier NAME ID)
index b8c60a761693eefc0677b945848f089d0e372865..377c03ad8314e9c924b50e5d95c4fd14c980ce0d 100644 (file)
@@ -82,6 +82,8 @@ endif()
 
 # modules
 
+include(GNUInstallDirs)
+
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
 
 if(NOT BUILD_DOCSONLY)
index 57509844a83d0803348fc62df2a8227da921baf9..7dc13f1190ed68d4f0cc613843cf6a647f4e3d65 100644 (file)
@@ -50,9 +50,28 @@ if(NOT BUILD_DOCSONLY)
 
     # keep last
     configure_file(${CONFIGURE_FILE_IN} ${CONFIGURE_FILE_OUT} @ONLY)
-    include(CPack.txt)
 endif()
 
+include(CPack.txt)
+
+install(FILES
+            AUTHORS
+            BUGS.md
+            ChangeLog
+            ChangeLog-0.md
+            ChangeLog-1.0.md
+            ChangeLog-1.1.md
+            ChangeLog.md
+            CONTRIBUTING.md
+            COPYING
+            LICENSE
+            NEWS
+            README.md
+            TODO
+        COMPONENT doc
+        DESTINATION ${CMAKE_INSTALL_DOCDIR}/
+        )
+
 if(ENV{INVALID_CONFIGURATION})
     message(FATAL_ERROR "invalid configuration -- giving up")
 endif()
index c39732923206e4baac96d8db3a3d64c61011842c..97221b621a8ee4c981e28d480394550f318b9f29 100644 (file)
--- a/CPack.txt
+++ b/CPack.txt
@@ -30,11 +30,48 @@ set(CPACK_SOURCE_TXZ 0)
 set(CPACK_SOURCE_TZ 0)
 set(CPACK_SOURCE_ZIP ${WIN32})
 
+# project internals
+set(CPACK_PACKAGE_LICENSE "BSD-3-Clause")
+set(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
+set(CPACK_PACKAGE_VENDOR "${PROJECT_CONTACT}")
+set(CPACK_PACKAGE_DESCRIPTION
+       "libmemcached is an open source C/C++ client library and tools for the
+memcached server (http://memcached.org/). It has been designed to be
+light on memory usage, thread safe, and provide full access to server
+side methods.")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
+#set(CPACK_PACKAGE_CHECKSUM SHA1)
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
+set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
+set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
+
+set(CPACK_SOURCE_IGNORE_FILES "/[.]git/;/[.](idea|settings|c?project);~$;[.]log$;[.]bak$")
+
+set(CPACK_PACKAGE_FILE_NAME
+        "${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
+
+set(CPACK_ARCHIVE_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+
+# dependencies
+if(HAVE_LIBSASL)
+    string(APPEND CPACK_PACKAGE_DEPENDS " libsasl2")
+endif()
+if(HAVE_TBB)
+    string(APPEND CPACK_PACKAGE_DEPENDS " tbb")
+endif()
+if(HAVE_LIBEVENT)
+    string(APPEND CPACK_PACKAGE_DEPENDS " libevent")
+endif()
+
+
 # DEBs
 if(EXISTS /usr/bin/dpkg)
     cpack_include_if(DEB)
 endif()
 
+if(APPLE)
+endif()
+
 # BSDs
 if(CMAKE_SYSTEM_NAME MATCHES BSD)
     cpack_include_if(BSD)
@@ -45,13 +82,5 @@ if(EXISTS /usr/bin/dnf OR EXISTS /usr/bin/yum OR EXISTS /usr/bin/rpmbuild)
     cpack_include_if(RPM)
 endif()
 
-# project internals
-set(CPACK_PACKAGE_VENDOR ${CMAKE_PROJECT_HOMEPAGE_URL})
-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
-set(CPACK_PACKAGE_CHECKSUM SHA1)
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
-set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
-
 # keep last
 include(CPack)
index 85668a1c245d39441b8ca181a14db8513c004154..ea19c9b66335eb91b2278697b26961ab40a7d44b 100644 (file)
@@ -1,11 +1,6 @@
 set(CPACK_BINARY_DEB ON)
-set(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
-if(HAVE_LIBSASL)
-    string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " libsasl2")
-endif()
-if(HAVE_TBB)
-    string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " tbb")
-endif()
-if(HAVE_LIBEVENT)
-    string(APPEND CPACK_DEBIAN_PACKAGE_DEPENDS " libevent")
-endif()
+set(CPACK_DEB_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
+set(CPACK_COMPONENT_bin_DEPENDS lib)
+set(CPACK_COMPONENT_dev_DEPENDS lib)
diff --git a/CPackFreeBSD.txt b/CPackFreeBSD.txt
new file mode 100644 (file)
index 0000000..88106d5
--- /dev/null
@@ -0,0 +1,2 @@
+set(CPACK_BINARY_FREEBSD ON)
+set(CPACK_FREEBSD_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
index 9c092cfdba568bd824fe300fce7a261b592eea42..acde628296a96b766fee7c3b940d542a3d8e59ea 100644 (file)
@@ -1 +1,7 @@
 set(CPACK_BINARY_RPM ON)
+set(CPACK_RPM_COMPONENT_INSTALL ${CPACK_COMPONENT_INSTALL})
+set(CPACK_RPM_PACKAGE_DEPENDS "${CPACK_PACKAGE_DEPENDS}")
+set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_PACKAGE_LICENSE}")
+set(CPACK_RPM_CHANGELOG_FILE "${CPACK_CHANGELOG_FILE}")
+set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
+set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
index 2d5846a7e44c722a480cd658ba76a2062537aa40..e464cab8381d4605eb76da50796e2e71f809f186 100644 (file)
@@ -2,6 +2,8 @@
 
 ## v 1.1.0
 
+> released YYYY-MM-DD
+
 **NOTE:**
 This is a bug fix release, not a feature release. The minor version number
 was incremented due to the following changes:
@@ -18,7 +20,6 @@ was incremented due to the following changes:
         * Travis: https://travis-ci.org/m6w6/libmemcached (Linux **·** arm64, ppc64le, s390x)
         * Sourcehut: https://builds.sr.ht/~m6w6/libmemcached (FreeBSD, OpenBSD **·** amd64)
 
-> released YYYY-MM-DD
 
 * Fix build failure due to comparison of incompatible types in bin/memflush and bin/memstat.
 * Fix wrong type of memcached_instance_st::server_timeout_counter_query_id from uint32_t to uint64_t.
index abd3c83d6a0e8b28dbdfaeb4819cdcf9d04ac473..3d8d9699138e297bd5aa36adffdf8acdea209968 100644 (file)
@@ -31,6 +31,7 @@ if(ENABLE_MEMASLAP AND CMAKE_USE_PTHREADS_INIT)
                     INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR})
         endif()
         install(TARGETS memaslap
+                COMPONENT bin
                 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
     endif()
 
index dd6a32c50ae9fa3cf3d529844b39f244255a5c83..1240f31ebacca303126ed1a1e1d6a480dc7ac626 100644 (file)
@@ -32,8 +32,13 @@ else()
     configure_file("conf.py.in" "conf.py" @ONLY)
     add_subdirectory(source)
 
+    file(GLOB_RECURSE DOCS_SOURCE
+            CONFIGURE_DEPENDS
+            "*.rst")
+
     if(BUILD_DOCS_HTML)
-        add_custom_target(html
+        add_custom_command(
+                OUTPUT "${SPHINX_HTML_DIR}"
                 COMMAND
                 ${SPHINX_EXECUTABLE}
                 -q -b html
@@ -42,12 +47,21 @@ else()
                 ${SPHINX_OPTIONS}
                 "${SPHINX_SOURCE_DIR}"
                 "${SPHINX_HTML_DIR}"
+                COMMAND ${CMAKE_COMMAND} -E touch html
                 BYPRODUCTS ${SPHINX_HTML_DIR}
+                DEPENDS "${DOCS_SOURCE}"
                 )
+        add_custom_target(html ALL DEPENDS "${SPHINX_HTML_DIR}")
+
+        install(DIRECTORY ${SPHINX_HTML_DIR}/
+                COMPONENT doc
+                DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
     endif()
 
     if(BUILD_DOCS_MAN)
-        add_custom_target(man ALL
+        add_custom_command(
+                OUTPUT ${SPHINX_MAN_DIR}
+                COMMAND
                 ${SPHINX_EXECUTABLE}
                 -q -b man
                 -c "${SPHINX_BUILD_DIR}"
@@ -55,8 +69,11 @@ else()
                 ${SPHINX_OPTIONS}
                 "${SPHINX_SOURCE_DIR}"
                 "${SPHINX_MAN_DIR}"
+                COMMAND ${CMAKE_COMMAND} -E touch man
                 BYPRODUCTS ${SPHINX_MAN_DIR}
+                DEPENDS "${DOCS_SOURCE}"
                 )
+        add_custom_target(man ALL DEPENDS "${SPHINX_MAN_DIR}")
 
         set(MAN_EXT "")
         if(BUILD_DOCS_MANGZ)
@@ -76,10 +93,12 @@ else()
         endif()
 
         install(DIRECTORY ${SPHINX_MAN_DIR}/
+                COMPONENT doc
                 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
                 FILES_MATCHING PATTERN *.1${MAN_EXT}
                 )
         install(DIRECTORY ${SPHINX_MAN_DIR}/
+                COMPONENT doc
                 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3
                 FILES_MATCHING PATTERN *.3${MAN_EXT}
                 )
index 282aff209c77083fe54b169fe4ec8fb4fe084d61..42de1de6eb0e990389708678ae9577e4a1bfc85c 100644 (file)
@@ -8,7 +8,12 @@ ChangeLog v1.1
 v 1.1.0
 -------
 
-**NOTE:**\ :raw-html-m2r:`<br>`
+..
+
+   released YYYY-MM-DD
+
+
+**NOTE:**
 This is a bug fix release, not a feature release. The minor version number
 was incremented due to the following changes:
 
@@ -17,7 +22,7 @@ was incremented due to the following changes:
 * Ported test suite to Catch2.
 * Build requires C++11 compiler support.
 * Tests require C++17 compiler support.
-* Moved the project from launchpad to github: 
+* Moved the project from launchpad to github:
 
   * Source: https://github.com/m6w6/libmemcached
   * Documentation: https://m6w6.github.io/libmemcached
@@ -25,12 +30,7 @@ was incremented due to the following changes:
 
     * Github: https://github.com/m6w6/libmemcached/actions (Linux, MacOS **·** amd64)
     * Travis: https://travis-ci.org/m6w6/libmemcached (Linux **·** arm64, ppc64le, s390x)
-    * Cirrus: https://cirrus-ci.com/m6w6/libmemcached (FreeBSD **·** amd64)
-
-..
-
-   released YYYY-MM-DD
-
+    * Sourcehut: https://builds.sr.ht/~m6w6/libmemcached (FreeBSD, OpenBSD **·** amd64)
 
 
 * Fix build failure due to comparison of incompatible types in bin/memflush and bin/memstat.
@@ -58,7 +58,7 @@ was incremented due to the following changes:
 * Fix `gh #62 <https://github.com/m6w6/libmemcached/issues/62>`_\ :
   uint32_t overflow cause busy loop.
 * Removed restriction of UDP+IPv6.
-* Fix SERVER_ERROR_MEMORY_ALLOCATION_FAILURE: 
+* Fix SERVER_ERROR_MEMORY_ALLOCATION_FAILURE:
   recognize more strings returned by the server.
 * Fix `gh #13 <https://github.com/m6w6/libmemcached/issues/13>`_\ :
   reset continuum counter after freeing them.
@@ -103,7 +103,7 @@ was incremented due to the following changes:
 * Fix memaslap: build fails with newer compiler versions.
 * Fix usage of strerror_r() implementations returning pointer to char.
 * Fix pipelining commands with memcached >= 1.6.
-* Fixed memcached_stat_get_value(): buffer overflow.
+* Fix memcached_stat_get_value(): buffer overflow.
 * Fix memcached_stat(): undefined behavior due to unintialized memcached_return_t.
 * Fix SASL tests: requires SASL_PWDB_CONF.
 * Fix bin/memaslap to idnentify itself as memaslap instead of memslap.
@@ -113,6 +113,9 @@ was incremented due to the following changes:
   `gh #64 <https://github.com/m6w6/libmemcached/issues/64>`_ and
   `gh #21 <https://github.com/m6w6/libmemcached/issues/21>`_\ :
   clarify documentation on replication.
+* Fix `gh #95 <https://github.com/m6w6/libmemcached/issues/95>`_\ :
+  MEMCACHED_CALLBACK_GET_FAILURE and MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+* Fix bin/memcat to output flags if requested with ``--flag``.
 
 ----
 
index 7b4c34981f7a6f80f8f26473febd35b7ddbfd27d..250805d3112ba1bf64e3c98e1948356b02ab8740 100644 (file)
@@ -10,6 +10,7 @@ foreach(CLIENT IN LISTS CLIENTS)
                 INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR})
     endif()
     install(TARGETS ${CLIENT}
+            COMPONENT bin
             RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 endforeach()
 
index 82e4d332a98c2d18c75955c4c2b83d57387b21c9..06b0c31510acf4494f59ef3506f8ef1298b302b4 100644 (file)
@@ -40,9 +40,14 @@ target_include_directories(libhashkit PUBLIC
 configure_file(hashkitcon.h.in hashkitcon.h @ONLY)
 
 install(TARGETS libhashkit EXPORT libhashkit-targets
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+        LIBRARY
+        COMPONENT lib
+        NAMELINK_COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_LIBDIR})
 export(EXPORT libhashkit-targets NAMESPACE libmemcached::)
-install(EXPORT libhashkit-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libhashkit-targets NAMESPACE libmemcached::
+        COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
 
 install_public_headers(
         libhashkit
index 0287fcc920b1a5443ad891c1fe25ee1b840811b3..c3d5389312568cbf733802318d9f8fc84f42111b 100644 (file)
@@ -120,9 +120,14 @@ target_include_directories(libmemcached PUBLIC
 enable_dtrace_for(libmemcached libmemcached_probes.d dtrace_probes.h)
 
 install(TARGETS libmemcached EXPORT libmemcached-targets
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+        LIBRARY
+        COMPONENT lib
+        NAMELINK_COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_LIBDIR})
 export(EXPORT libmemcached-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcached-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcached-targets NAMESPACE libmemcached::
+        COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
 
 install_public_headers(
         libmemcached
index 43d59de1310ca064b509a03c0b4b0dfa318ab020..fc0315654ad5089519b07fbcacc9d3a8e9cce0ae 100644 (file)
@@ -36,6 +36,11 @@ target_include_directories(libmemcachedprotocol PUBLIC
         $<INSTALL_INTERFACE:include>)
 
 install(TARGETS libmemcachedprotocol EXPORT libmemcachedprotocol-targets
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+        LIBRARY
+        COMPONENT lib
+        NAMELINK_COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_LIBDIR})
 export(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcachedprotocol-targets NAMESPACE libmemcached::
+        COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
index b49d0d030a4ed28efcb68cd0124be86de515eb3d..af2562cd9ac89a6bc3618126c5367175fc94b6ff 100644 (file)
@@ -41,6 +41,11 @@ target_include_directories(libmemcachedutil PUBLIC
         $<INSTALL_INTERFACE:include>)
 
 install(TARGETS libmemcachedutil EXPORT libmemcachedutil-targets
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+        LIBRARY
+        COMPONENT lib
+        NAMELINK_COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_LIBDIR})
 export(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::)
-install(EXPORT libmemcachedutil-targets NAMESPACE libmemcached:: DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
+install(EXPORT libmemcachedutil-targets NAMESPACE libmemcached::
+        COMPONENT dev
+        DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)
index 119e78bb6053d5d6a11153a368120db1db0ba29b..a295562328e9830f27021ec3b14ccb4dba61a3b1 100644 (file)
@@ -1,15 +1,18 @@
 
 install(FILES ax_libmemcached.m4
+        COMPONENT dev
         DESTINATION ${CMAKE_INSTALL_DATADIR}/aclocal
         )
 
 configure_file(example.cnf.in example.cnf @ONLY)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/example.cnf
+        COMPONENT dev
         DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
         )
 
 configure_file(libmemcached.pc.in libmemcached.pc @ONLY)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmemcached.pc
+        COMPONENT dev
         DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
         )
 
@@ -43,4 +46,5 @@ install(FILES
         ${CMAKE_CURRENT_BINARY_DIR}/libmemcached-version.cmake
         ${CMAKE_CURRENT_BINARY_DIR}/libmemcachedprotocol-version.cmake
         ${CMAKE_CURRENT_BINARY_DIR}/libmemcachedutil-version.cmake
+        COMPONENT dev
         DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)