From 31d934d19bf82efdfc320fa7008008242a65332a Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Fri, 22 Mar 2024 20:06:01 +0100 Subject: all: rename output files Signed-off-by: Anna (navi) Figueiredo Gomes --- CMakeLists.txt | 160 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 80 insertions(+), 80 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f12937..195934f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) MACRO(getVersionBit name) SET(VERSION_REGEX "^#define ${name} (.+)$") - FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/hiredis.h" + FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/hiredict.h" VERSION_BIT REGEX ${VERSION_REGEX}) STRING(REGEX REPLACE ${VERSION_REGEX} "\\1" ${name} "${VERSION_BIT}") ENDMACRO(getVersionBit) @@ -20,139 +20,138 @@ getVersionBit(HIREDIS_SONAME) SET(VERSION "${HIREDIS_MAJOR}.${HIREDIS_MINOR}.${HIREDIS_PATCH}") MESSAGE("Detected version: ${VERSION}") -PROJECT(hiredis LANGUAGES "C" VERSION "${VERSION}") +PROJECT(hiredict LANGUAGES "C" VERSION "${VERSION}") INCLUDE(GNUInstallDirs) OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON) -OPTION(ENABLE_SSL "Build hiredis_ssl for SSL support" OFF) +OPTION(ENABLE_SSL "Build hiredict_ssl for SSL support" OFF) OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF) OPTION(ENABLE_SSL_TESTS "Should we test SSL connections" OFF) -OPTION(ENABLE_EXAMPLES "Enable building hiredis examples" OFF) +OPTION(ENABLE_EXAMPLES "Enable building hiredict examples" OFF) OPTION(ENABLE_ASYNC_TESTS "Should we run all asynchronous API tests" OFF) # Historically, the NuGet file was always install; default # to ON for those who rely on that historical behaviour. OPTION(ENABLE_NUGET "Install NuGET packaging details" ON) -# Hiredis requires C99 +# Hiredict requires C99 SET(CMAKE_C_STANDARD 99) SET(CMAKE_DEBUG_POSTFIX d) -SET(hiredis_sources +SET(hiredict_sources alloc.c async.c - hiredis.c + hiredict.c net.c read.c sds.c sockcompat.c) -SET(hiredis_sources ${hiredis_sources}) +SET(hiredict_sources ${hiredict_sources}) IF(WIN32) ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -DWIN32_LEAN_AND_MEAN) ENDIF() -ADD_LIBRARY(hiredis ${hiredis_sources}) -ADD_LIBRARY(hiredis::hiredis ALIAS hiredis) -set(hiredis_export_name hiredis CACHE STRING "Name of the exported target") -set_target_properties(hiredis PROPERTIES EXPORT_NAME ${hiredis_export_name}) +ADD_LIBRARY(hiredict ${hiredict_sources}) +ADD_LIBRARY(hiredict::hiredict ALIAS hiredict) +set(hiredict_export_name hiredict CACHE STRING "Name of the exported target") +set_target_properties(hiredict PROPERTIES EXPORT_NAME ${hiredict_export_name}) -SET_TARGET_PROPERTIES(hiredis +SET_TARGET_PROPERTIES(hiredict PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE - VERSION "${HIREDIS_SONAME}") + VERSION "${HIREDIS_SONAME}") IF(MSVC) - SET_TARGET_PROPERTIES(hiredis + SET_TARGET_PROPERTIES(hiredict PROPERTIES COMPILE_FLAGS /Z7) ENDIF() IF(WIN32) - TARGET_LINK_LIBRARIES(hiredis PUBLIC ws2_32 crypt32) + TARGET_LINK_LIBRARIES(hiredict PUBLIC ws2_32 crypt32) ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - TARGET_LINK_LIBRARIES(hiredis PUBLIC m) + TARGET_LINK_LIBRARIES(hiredict PUBLIC m) ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS") - TARGET_LINK_LIBRARIES(hiredis PUBLIC socket) + TARGET_LINK_LIBRARIES(hiredict PUBLIC socket) ENDIF() -TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $ $) +TARGET_INCLUDE_DIRECTORIES(hiredict PUBLIC $ $) -CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY) +CONFIGURE_FILE(hiredict.pc.in hiredict.pc @ONLY) -set(CPACK_PACKAGE_VENDOR "Redis") +set(CPACK_PACKAGE_VENDOR "Redict") set(CPACK_PACKAGE_DESCRIPTION "\ -Hiredis is a minimalistic C client library for the Redis database. +Hiredict is a minimalistic C client library for the Redict database. It is minimalistic because it just adds minimal support for the protocol, \ but at the same time it uses a high level printf-alike API in order to make \ it much higher level than otherwise suggested by its minimal code base and the \ -lack of explicit bindings for every Redis command. +lack of explicit bindings for every Redict command. Apart from supporting sending commands and receiving replies, it comes with a \ reply parser that is decoupled from the I/O layer. It is a stream parser designed \ for easy reusability, which can for instance be used in higher level language bindings \ for efficient reply parsing. -Hiredis only supports the binary-safe Redis protocol, so you can use it with any Redis \ -version >= 1.2.0. +Hiredict only supports the binary-safe Redis protocol. The library comes with multiple APIs. There is the synchronous API, the asynchronous API \ and the reply parsing API.") -set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/redis/hiredis") -set(CPACK_PACKAGE_CONTACT "michael dot grunder at gmail dot com") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://codeberg.org/redict/hiredict") +set(CPACK_PACKAGE_CONTACT "navi@vlhl.dev") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_RPM_PACKAGE_AUTOREQPROV ON) include(CPack) -INSTALL(TARGETS hiredis - EXPORT hiredis-targets +INSTALL(TARGETS hiredict + EXPORT hiredict-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) if (MSVC AND BUILD_SHARED_LIBS) - INSTALL(FILES $ + INSTALL(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo) endif() if (ENABLE_NUGET) # For NuGet packages - INSTALL(FILES hiredis.targets + INSTALL(FILES hiredict.targets DESTINATION build/native) endif() -INSTALL(FILES hiredis.h read.h sds.h async.h alloc.h sockcompat.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredis) +INSTALL(FILES hiredict.h read.h sds.h async.h alloc.h sockcompat.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) INSTALL(DIRECTORY adapters - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredis) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredis.pc +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredict.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -export(EXPORT hiredis-targets - FILE "${CMAKE_CURRENT_BINARY_DIR}/hiredis-targets.cmake" - NAMESPACE hiredis::) +export(EXPORT hiredict-targets + FILE "${CMAKE_CURRENT_BINARY_DIR}/hiredict-targets.cmake" + NAMESPACE hiredict::) if(WIN32) - SET(CMAKE_CONF_INSTALL_DIR share/hiredis) + SET(CMAKE_CONF_INSTALL_DIR share/hiredict) else() - SET(CMAKE_CONF_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/hiredis) + SET(CMAKE_CONF_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/hiredict) endif() SET(INCLUDE_INSTALL_DIR include) include(CMakePackageConfigHelpers) -write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/hiredis-config-version.cmake" +write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/hiredict-config-version.cmake" COMPATIBILITY SameMajorVersion) -configure_package_config_file(hiredis-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredis-config.cmake +configure_package_config_file(hiredict-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredict-config.cmake INSTALL_DESTINATION ${CMAKE_CONF_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR) -INSTALL(EXPORT hiredis-targets - FILE hiredis-targets.cmake - NAMESPACE hiredis:: +INSTALL(EXPORT hiredict-targets + FILE hiredict-targets.cmake + NAMESPACE hiredict:: DESTINATION ${CMAKE_CONF_INSTALL_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredis-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/hiredis-config-version.cmake +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredict-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/hiredict-config-version.cmake DESTINATION ${CMAKE_CONF_INSTALL_DIR}) @@ -163,82 +162,83 @@ IF(ENABLE_SSL) ENDIF() ENDIF() FIND_PACKAGE(OpenSSL REQUIRED) - SET(hiredis_ssl_sources + SET(hiredict_ssl_sources ssl.c) - ADD_LIBRARY(hiredis_ssl ${hiredis_ssl_sources}) - ADD_LIBRARY(hiredis::hiredis_ssl ALIAS hiredis_ssl) + ADD_LIBRARY(hiredict_ssl ${hiredict_ssl_sources}) + ADD_LIBRARY(hiredict::hiredict_ssl ALIAS hiredict_ssl) IF (APPLE AND BUILD_SHARED_LIBS) - SET_PROPERTY(TARGET hiredis_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup") + SET_PROPERTY(TARGET hiredict_ssl PROPERTY LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup") ENDIF() - SET_TARGET_PROPERTIES(hiredis_ssl + SET_TARGET_PROPERTIES(hiredict_ssl PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE - VERSION "${HIREDIS_SONAME}") + VERSION "${HIREDIS_SONAME}") IF(MSVC) - SET_TARGET_PROPERTIES(hiredis_ssl + SET_TARGET_PROPERTIES(hiredict_ssl PROPERTIES COMPILE_FLAGS /Z7) ENDIF() - TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE OpenSSL::SSL) + TARGET_LINK_LIBRARIES(hiredict_ssl PRIVATE OpenSSL::SSL) IF(WIN32) - TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE hiredis) + TARGET_LINK_LIBRARIES(hiredict_ssl PRIVATE hiredict) ENDIF() - CONFIGURE_FILE(hiredis_ssl.pc.in hiredis_ssl.pc @ONLY) + CONFIGURE_FILE(hiredict_ssl.pc.in hiredict_ssl.pc @ONLY) - INSTALL(TARGETS hiredis_ssl - EXPORT hiredis_ssl-targets + INSTALL(TARGETS hiredict_ssl + EXPORT hiredict_ssl-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) if (MSVC AND BUILD_SHARED_LIBS) - INSTALL(FILES $ + INSTALL(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo) endif() - INSTALL(FILES hiredis_ssl.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredis) + INSTALL(FILES hiredict_ssl.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredict) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredis_ssl.pc + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredict_ssl.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - export(EXPORT hiredis_ssl-targets - FILE "${CMAKE_CURRENT_BINARY_DIR}/hiredis_ssl-targets.cmake" - NAMESPACE hiredis::) + export(EXPORT hiredict_ssl-targets + FILE "${CMAKE_CURRENT_BINARY_DIR}/hiredict_ssl-targets.cmake" + NAMESPACE hiredict::) if(WIN32) - SET(CMAKE_CONF_INSTALL_DIR share/hiredis_ssl) + SET(CMAKE_CONF_INSTALL_DIR share/hiredict_ssl) else() - SET(CMAKE_CONF_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/hiredis_ssl) + SET(CMAKE_CONF_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/hiredict_ssl) endif() - configure_package_config_file(hiredis_ssl-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/hiredis_ssl-config.cmake + configure_package_config_file(hiredict_ssl-config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/hiredict_ssl-config.cmake INSTALL_DESTINATION ${CMAKE_CONF_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR) - INSTALL(EXPORT hiredis_ssl-targets - FILE hiredis_ssl-targets.cmake - NAMESPACE hiredis:: + INSTALL(EXPORT hiredict_ssl-targets + FILE hiredict_ssl-targets.cmake + NAMESPACE hiredict:: DESTINATION ${CMAKE_CONF_INSTALL_DIR}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredis_ssl-config.cmake + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/hiredict_ssl-config.cmake DESTINATION ${CMAKE_CONF_INSTALL_DIR}) ENDIF() IF(NOT DISABLE_TESTS) ENABLE_TESTING() - ADD_EXECUTABLE(hiredis-test test.c) - TARGET_LINK_LIBRARIES(hiredis-test hiredis) + ADD_EXECUTABLE(hiredict-test test.c) + TARGET_LINK_LIBRARIES(hiredict-test hiredict) IF(ENABLE_SSL_TESTS) - ADD_DEFINITIONS(-DHIREDIS_TEST_SSL=1) - TARGET_LINK_LIBRARIES(hiredis-test hiredis_ssl) + ADD_DEFINITIONS(-DHIREDIS_TEST_SSL=1) + TARGET_LINK_LIBRARIES(hiredict-test hiredict_ssl) ENDIF() IF(ENABLE_ASYNC_TESTS) - ADD_DEFINITIONS(-DHIREDIS_TEST_ASYNC=1) - TARGET_LINK_LIBRARIES(hiredis-test event) + ADD_DEFINITIONS(-DHIREDIS_TEST_ASYNC=1) + TARGET_LINK_LIBRARIES(hiredict-test event) ENDIF() - ADD_TEST(NAME hiredis-test + ADD_TEST(NAME hiredict-test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test.sh) ENDIF() -- cgit v1.2.3