Skip to content

Commit

Permalink
Rewrite CMakeLists.txt with modern cmake (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
sewenew authored Mar 13, 2021
1 parent 8ac506e commit df52281
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 107 deletions.
226 changes: 153 additions & 73 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,130 +1,210 @@
if (APPLE)
cmake_minimum_required(VERSION 3.0.0)
else()
cmake_minimum_required(VERSION 2.8.0)
endif()

set(REDIS_PLUS_PLUS_VERSION "1.2.1")
cmake_minimum_required(VERSION 3.1)

set(REDIS_PLUS_PLUS_VERSION "1.2.3")
message(STATUS "redis-plus-plus version: ${REDIS_PLUS_PLUS_VERSION}")

if (${CMAKE_VERSION} VERSION_LESS "3.0.0")
project(redis++)
else()
cmake_policy(SET CMP0048 NEW)
project(redis++ VERSION ${REDIS_PLUS_PLUS_VERSION})
endif()
project(redis++ LANGUAGES CXX VERSION ${REDIS_PLUS_PLUS_VERSION})

if (NOT DEFINED REDIS_PLUS_PLUS_CXX_STANDARD)
set(REDIS_PLUS_PLUS_CXX_STANDARD 11)
set(REDIS_PLUS_PLUS_DEFAULT_BUILD_TYPE "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE ${REDIS_PLUS_PLUS_DEFAULT_BUILD_TYPE} CACHE STRING "Set build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
endif()
message(STATUS "redis-plus-plus build type: ${CMAKE_BUILD_TYPE}")

message(STATUS "The CXX standard is c++${REDIS_PLUS_PLUS_CXX_STANDARD}")

if (NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${REDIS_PLUS_PLUS_CXX_STANDARD} -Wall -W -Werror")
set(REDIS_PLUS_PLUS_DEFAULT_CXX_STANDARD 11)
if(NOT REDIS_PLUS_PLUS_CXX_STANDARD)
set(REDIS_PLUS_PLUS_CXX_STANDARD ${REDIS_PLUS_PLUS_DEFAULT_CXX_STANDARD} CACHE STRING "Set CXX standard" FORCE)
set_property(CACHE REDIS_PLUS_PLUS_CXX_STANDARD PROPERTY STRINGS "11" "14" "17" "20")
endif()
message(STATUS "redis-plus-plus build with CXX standard: c++${REDIS_PLUS_PLUS_CXX_STANDARD}")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src/sw/redis++)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++${REDIS_PLUS_PLUS_CXX_STANDARD}")
endif()

file(GLOB PROJECT_SOURCE_FILES "${PROJECT_SOURCE_DIR}/*.cpp")
set(REDIS_PLUS_PLUS_SOURCE_DIR src/sw/redis++)

set(REDIS_PLUS_PLUS_SOURCES
"${REDIS_PLUS_PLUS_SOURCE_DIR}/command.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/command_options.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/connection.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/connection_pool.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/crc16.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/errors.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/pipeline.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/redis.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/redis_cluster.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/reply.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/sentinel.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/shards.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/shards_pool.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/subscriber.cpp"
"${REDIS_PLUS_PLUS_SOURCE_DIR}/transaction.cpp"
)

# TLS support
option(REDIS_PLUS_PLUS_USE_TLS "Build with TLS support" OFF)
message(STATUS "redis-plus-plus TLS support: ${REDIS_PLUS_PLUS_USE_TLS}")

if(REDIS_PLUS_PLUS_USE_TLS)
set(TLS_SUB_DIR "${REDIS_PLUS_PLUS_SOURCE_DIR}/tls")

if (REDIS_PLUS_PLUS_USE_TLS)
message(STATUS "Build with TLS support")
list(APPEND REDIS_PLUS_PLUS_SOURCES "${TLS_SUB_DIR}/tls.cpp")

set(TLS_SUB_DIR "${PROJECT_SOURCE_DIR}/tls")
set(REDIS_PLUS_PLUS_DEPENDS "hiredis,hiredis_ssl")
else()
set(TLS_SUB_DIR "${PROJECT_SOURCE_DIR}/no_tls")
endif()
set(TLS_SUB_DIR "${REDIS_PLUS_PLUS_SOURCE_DIR}/no_tls")

file(GLOB TLS_SOURCE_FILES "${TLS_SUB_DIR}/*.cpp")
set(REDIS_PLUS_PLUS_DEPENDS "hiredis")
endif()

# hiredis dependency
find_path(HIREDIS_HEADER hiredis)
find_library(HIREDIS_LIB hiredis)
find_package(hiredis QUIET)
if(hiredis_FOUND)
list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS hiredis::hiredis)

if(REDIS_PLUS_PLUS_USE_TLS)
find_package(hiredis_ssl REQUIRED)
list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS hiredis::hiredis_ssl)
endif()
else()
find_path(HIREDIS_HEADER hiredis REQUIRED)
find_library(HIREDIS_LIB hiredis REQUIRED)
list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS ${HIREDIS_LIB})

if(REDIS_PLUS_PLUS_USE_TLS)
find_library(HIREDIS_TLS_LIB hiredis_ssl REQUIRED)
list(APPEND REDIS_PLUS_PLUS_HIREDIS_LIBS ${HIREDIS_TLS_LIB})
endif()
endif()

# Build static library
option(REDIS_PLUS_PLUS_BUILD_STATIC "Build static library" ON)
message(STATUS "redis-plus-plus build static library: ${REDIS_PLUS_PLUS_BUILD_STATIC}")

if(REDIS_PLUS_PLUS_BUILD_STATIC)
set(STATIC_LIB redis++_static)

if (REDIS_PLUS_PLUS_BUILD_STATIC)
set(STATIC_LIB redis-plus-plus-static)
add_library(${STATIC_LIB} STATIC ${REDIS_PLUS_PLUS_SOURCES})

add_library(${STATIC_LIB} STATIC ${PROJECT_SOURCE_FILES} ${TLS_SOURCE_FILES})
list(APPEND REDIS_PLUS_PLUS_TARGETS ${STATIC_LIB})

target_include_directories(${STATIC_LIB} PUBLIC ${PROJECT_SOURCE_DIR} ${TLS_SUB_DIR})
target_include_directories(${STATIC_LIB} PUBLIC ${HIREDIS_HEADER})
target_include_directories(${STATIC_LIB} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${REDIS_PLUS_PLUS_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${TLS_SUB_DIR}>
$<INSTALL_INTERFACE:include>)

if(hiredis_FOUND)
target_link_libraries(${STATIC_LIB} PUBLIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS})
else()
target_include_directories(${STATIC_LIB} PUBLIC $<BUILD_INTERFACE:${HIREDIS_HEADER}>)
endif()

if (WIN32)
target_compile_definitions(${STATIC_LIB} PRIVATE NOMINMAX)
set_target_properties(${STATIC_LIB} PROPERTIES CXX_STANDARD ${REDIS_PLUS_PLUS_CXX_STANDARD} CXX_EXTENSIONS OFF)
set_target_properties(${STATIC_LIB} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}_static)
set_target_properties(${STATIC_LIB} PROPERTIES CXX_STANDARD ${REDIS_PLUS_PLUS_CXX_STANDARD})
set_target_properties(${STATIC_LIB} PROPERTIES OUTPUT_NAME redis++_static)
else()
set_target_properties(${STATIC_LIB} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
target_compile_options(${STATIC_LIB} PRIVATE "-Wall" "-W" "-Werror")
set_target_properties(${STATIC_LIB} PROPERTIES OUTPUT_NAME redis++)
endif()

set_target_properties(${STATIC_LIB} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(${STATIC_LIB} PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(${STATIC_LIB} PROPERTIES CXX_EXTENSIONS OFF)

option(REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC "Build static library with position independent code" ON)
message(STATUS "redis-plus-plus build static library with position independent code: ${REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC}")

if(REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC)
set_target_properties(${STATIC_LIB} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
endif()

# Build shared library
option(REDIS_PLUS_PLUS_BUILD_SHARED "Build shared library" ON)
message(STATUS "redis-plus-plus build shared library: ${REDIS_PLUS_PLUS_BUILD_SHARED}")

if (REDIS_PLUS_PLUS_BUILD_SHARED)
set(SHARED_LIB redis-plus-plus-shared)
if(REDIS_PLUS_PLUS_BUILD_SHARED)
set(SHARED_LIB redis++)

add_library(${SHARED_LIB} SHARED ${PROJECT_SOURCE_FILES} ${TLS_SOURCE_FILES})
add_library(${SHARED_LIB} SHARED ${REDIS_PLUS_PLUS_SOURCES})

target_include_directories(${SHARED_LIB} PUBLIC ${PROJECT_SOURCE_DIR} ${TLS_SUB_DIR})
target_include_directories(${SHARED_LIB} PUBLIC ${HIREDIS_HEADER})
list(APPEND REDIS_PLUS_PLUS_TARGETS ${SHARED_LIB})

if (WIN32)
target_compile_definitions(${SHARED_LIB} PRIVATE NOMINMAX)
set_target_properties(${SHARED_LIB} PROPERTIES CXX_STANDARD ${REDIS_PLUS_PLUS_CXX_STANDARD} CXX_EXTENSIONS OFF)
set_target_properties(${SHARED_LIB} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
endif()
target_include_directories(${SHARED_LIB} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${REDIS_PLUS_PLUS_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${TLS_SUB_DIR}>
$<INSTALL_INTERFACE:include>)

target_link_libraries(${SHARED_LIB} ${HIREDIS_LIB})
if(hiredis_FOUND)
target_link_libraries(${SHARED_LIB} PUBLIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS})
else()
target_include_directories(${SHARED_LIB} PUBLIC $<BUILD_INTERFACE:${HIREDIS_HEADER}>)
target_link_libraries(${SHARED_LIB} PUBLIC ${REDIS_PLUS_PLUS_HIREDIS_LIBS})
endif()

if (REDIS_PLUS_PLUS_USE_TLS)
find_library(HIREDIS_TLS_LIB hiredis_ssl)
target_link_libraries(${SHARED_LIB} ${HIREDIS_TLS_LIB})
if(WIN32)
target_compile_definitions(${SHARED_LIB} PRIVATE NOMINMAX)
set_target_properties(${SHARED_LIB} PROPERTIES CXX_STANDARD ${REDIS_PLUS_PLUS_CXX_STANDARD})
set_target_properties(${SHARED_LIB} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
else()
target_compile_options(${SHARED_LIB} PRIVATE "-Wall" "-W" "-Werror")
endif()

set_target_properties(${SHARED_LIB} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
set_target_properties(${SHARED_LIB} PROPERTIES OUTPUT_NAME redis++)
set_target_properties(${SHARED_LIB} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(${SHARED_LIB} PROPERTIES CXX_EXTENSIONS OFF)
set_target_properties(${SHARED_LIB} PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(${SHARED_LIB} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
endif()

option(REDIS_PLUS_PLUS_BUILD_TEST "Build tests for redis++" ON)
message(STATUS "redis-plus-plus build test: ${REDIS_PLUS_PLUS_BUILD_TEST}")

if (REDIS_PLUS_PLUS_BUILD_TEST)
if(REDIS_PLUS_PLUS_BUILD_TEST)
add_subdirectory(test)
endif()

# Install static lib.
if (REDIS_PLUS_PLUS_BUILD_STATIC)
install(TARGETS ${STATIC_LIB}
ARCHIVE DESTINATION lib)
endif()
install(TARGETS ${REDIS_PLUS_PLUS_TARGETS}
EXPORT redis++-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)

# Install shared lib.
if (REDIS_PLUS_PLUS_BUILD_SHARED)
if (WIN32)
install(TARGETS ${SHARED_LIB}
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib)
else()
install(TARGETS ${SHARED_LIB}
LIBRARY DESTINATION lib)
endif()
endif()
set(REDIS_PLUS_PLUS_CMAKE_DESTINATION share/cmake/redis++)

install(EXPORT redis++-targets
FILE redis++-targets.cmake
NAMESPACE redis++::
DESTINATION ${REDIS_PLUS_PLUS_CMAKE_DESTINATION})

# Install headers.
set(HEADER_PATH "sw/redis++")
file(GLOB HEADERS "${PROJECT_SOURCE_DIR}/*.h*" "${TLS_SUB_DIR}/*.h")
file(GLOB HEADERS "${REDIS_PLUS_PLUS_SOURCE_DIR}/*.h*" "${TLS_SUB_DIR}/*.h")
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${HEADER_PATH})

include(CMakePackageConfigHelpers)

write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++-config-version.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)

configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/redis++-config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++-config.cmake"
INSTALL_DESTINATION ${REDIS_PLUS_PLUS_CMAKE_DESTINATION})

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++-config-version.cmake"
DESTINATION ${REDIS_PLUS_PLUS_CMAKE_DESTINATION})

export(EXPORT redis++-targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++-targets.cmake"
NAMESPACE redis++::)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/redis++.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++.pc" @ONLY)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/redis++.pc"
DESTINATION "lib/pkgconfig")
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ The master branch is the stable branch, which passes all tests. The dev branch i

Since *redis-plus-plus* is based on *hiredis*, you should install *hiredis* first. The minimum version requirement for *hiredis* is **v0.12.1**. However, [the latest stable release](https://github.com/redis/hiredis/releases) of *hiredis* is always recommended.

**NOTE**: You must ensure that there's only 1 version of hiredis is installed. Otherwise, you might get some wired problems. Check the following issues for example: [issue 135](https://github.com/sewenew/redis-plus-plus/issues/135), [issue 140](https://github.com/sewenew/redis-plus-plus/issues/140) and [issue 158](https://github.com/sewenew/redis-plus-plus/issues/158).

```
git clone https://github.com/redis/hiredis.git
Expand All @@ -77,8 +79,6 @@ make PREFIX=/non/default/path
make PREFIX=/non/default/path install
```

**NOTE**: You must ensure that there's only 1 version of hiredis is installed. Otherwise, you might get some wired problems. Check the following issues for example: [issue 135](https://github.com/sewenew/redis-plus-plus/issues/135), [issue 140](https://github.com/sewenew/redis-plus-plus/issues/140) and [issue 158](https://github.com/sewenew/redis-plus-plus/issues/158).

### Install redis-plus-plus

*redis-plus-plus* is built with [CMAKE](https://cmake.org).
Expand All @@ -88,11 +88,11 @@ git clone https://github.com/sewenew/redis-plus-plus.git
cd redis-plus-plus
mkdir compile
mkdir build
cd compile
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake ..
make
Expand All @@ -104,23 +104,25 @@ cd ..
If *hiredis* is installed at non-default location, you should use `CMAKE_PREFIX_PATH` to specify the installation path of *hiredis*. By default, *redis-plus-plus* is installed at */usr/local*. However, you can use `CMAKE_INSTALL_PREFIX` to install *redis-plus-plus* at non-default location.

```
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus ..
cmake -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus ..
```

By default, *redis-plus-plus* is built with `-std=c++11` standard. If you want to use the [std::string_view](#stringview) and [std::optional](#optional) features, you can also build *redis-plus-plus* with `-std=c++17` standard by specifying the following cmake flag: `-DREDIS_PLUS_PLUS_CXX_STANDARD=17`.

```
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus -DREDIS_PLUS_PLUS_CXX_STANDARD=17 ..
cmake -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus -DREDIS_PLUS_PLUS_CXX_STANDARD=17 ..
```

When compiling *redis-plus-plus*, it also compiles a test program, which might take a while. However, you can disable building test with the following cmake option: `-DREDIS_PLUS_PLUS_BUILD_TEST=OFF`.

```
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus -DREDIS_PLUS_PLUS_BUILD_TEST=OFF ..
cmake -DCMAKE_PREFIX_PATH=/path/to/hiredis -DCMAKE_INSTALL_PREFIX=/path/to/install/redis-plus-plus -DREDIS_PLUS_PLUS_BUILD_TEST=OFF ..
```

By default, *redis-plus-plus* builds both a static library and a shared library. If you only want to build one of them, you can disable the other with `-DREDIS_PLUS_PLUS_BUILD_STATIC=OFF` or `-DREDIS_PLUS_PLUS_BUILD_SHARED=OFF`.

*redis-plus-plus* builds static library with `-fPIC` option, i.e. Position Independent Code, by default. However, you can disable it with `-DREDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC=OFF`.

#### Windows Support

Now *hiredis* has Windows support, and since Visual Studio 2017, Visual Studio has built-in support for CMake. So *redis-plus-plus* also supports Windows platform now. It has been fully tested with Visual Studio 2017 and later on Win 10. I'm not familiar with Visual Studio environment, and the following doc might not be accurate. If you're familiar with the Windows platform, feel free to update this doc on how to install *redis-plus-plus* on Windows.
Expand Down Expand Up @@ -174,7 +176,7 @@ Since *redis-plus-plus* depends on *hiredis*, we need to specify the installatio
"type": "FILEPATH"
},
{
"name": "HIREDIS_STATIC_LIB",
"name": "TEST_HIREDIS_LIB",
"value": "installation path of static library of hiredis",
"type": "FILEPATH"
}
Expand Down Expand Up @@ -732,7 +734,7 @@ make PREFIX=/non/default/path USE_SSL=1 install
Then you can build *redis-plus-plus* to enable TLS support by specifying the `-DREDIS_PLUS_PLUS_USE_TLS=ON` option:

```
cmake -DREDIS_PLUS_PLUS_USE_TLS=ON -DCMAKE_BUILD_TYPE=Release ..
cmake -DREDIS_PLUS_PLUS_USE_TLS=ON ..
```

##### Connection Options
Expand All @@ -747,7 +749,7 @@ opts.port = 6379;
opts.tls.enabled = true; // Required. `false` by default.
opts.tls.cert = "/path/to/client/certificate"; // Optional
opts.tls.key = "/path/to/private/key/file"; // Optional
opts.tls.cacert = "/path/to/CA/certificate/file"; // Optional
opts.tls.cacert = "/path/to/CA/certificate/file"; // You can also set `opts.tls.cacertdir` instead.
opts.tls.sni = "server-name-indication"; // Optional
```

Expand Down
12 changes: 12 additions & 0 deletions cmake/redis++-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

string(REPLACE "," ";" REDIS_PLUS_PLUS_DEPENDS_LIST @REDIS_PLUS_PLUS_DEPENDS@)
foreach(REDIS_PLUS_PLUS_DEP ${REDIS_PLUS_PLUS_DEPENDS_LIST})
find_dependency(${REDIS_PLUS_PLUS_DEP} REQUIRED)
endforeach()

include("${CMAKE_CURRENT_LIST_DIR}/redis++-targets.cmake")

check_required_components(redis++)
12 changes: 12 additions & 0 deletions cmake/redis++.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: redis++
Description: This is a Redis client, based on hiredis and written in C++11. It supports scritpting, pub/sub, pipeline, transaction, Redis Cluster, Redis Sentinel, connection pool, ACL, SSL and thread safety.
Version: @PROJECT_VERSION@
URL: https://github.com/sewenew/redis-plus-plus
Requires: @REDIS_PLUS_PLUS_DEPENDS@
Cflags: -I${includedir}
Libs: -L${libdir} -lredis++
Loading

0 comments on commit df52281

Please sign in to comment.