)
configure_file(example.cnf.in example.cnf @ONLY)
-install(FILES example.cnf
- DESTINATION ${CMAKE_INSTALL_DATADIR}
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/example.cnf
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
)
configure_file(libmemcached.pc.in libmemcached.pc @ONLY)
-install(FILES libmemcached.pc
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmemcached.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
configure_file(memcached.pwdb.in memcached.pwdb @ONLY)
configure_file(memcached.conf.in memcached.conf @ONLY)
endif()
+
+configure_package_config_file(libmemcached-config.cmake.in
+ libmemcached-config.cmake
+ INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)
+write_basic_package_version_file(libhashkit-version.cmake
+ VERSION ${LIBHASHKIT_VERSION}
+ COMPATIBILITY SameMajorVersion)
+write_basic_package_version_file(libmemcached-version.cmake
+ VERSION ${LIBMEMCACHED_VERSION}
+ COMPATIBILITY SameMajorVersion)
+write_basic_package_version_file(libmemcachedprotocol-version.cmake
+ VERSION ${LIBMEMCACHEDPROTOCOL_VERSION}
+ COMPATIBILITY SameMajorVersion)
+write_basic_package_version_file(libmemcachedutil-version.cmake
+ VERSION ${LIBMEMCACHEDUTIL_VERSION}
+ COMPATIBILITY SameMajorVersion)
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libmemcached-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libhashkit-version.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libmemcached-version.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libmemcachedprotocol-version.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/libmemcachedutil-version.cmake
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake/)