From 38675d23cc3bb45e2dfdeaed3a4a843f698731b3 Mon Sep 17 00:00:00 2001 From: Michael Grunder Date: Thu, 27 Feb 2020 21:29:05 -0800 Subject: Housekeeping fixes (#764) Housekeeping * Check for C++ (#758, #750) * Include `alloc.h` in `make install` and `cmake` * Add a `.def` file for Windows (#760) * Include allocation wrappers referenced in adapter headers * Fix minor syntax errors and typos in README * Fix CI in Windows by properly escaping arguments (#761) --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 770e1a1..564c138 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ PROJECT(hiredis VERSION "${VERSION}") SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples") -ADD_LIBRARY(hiredis SHARED +SET(hiredis_sources async.c dict.c hiredis.c @@ -33,6 +33,15 @@ ADD_LIBRARY(hiredis SHARED sockcompat.c alloc.c) +IF(WIN32) + SET(hiredis_sources + ${hiredis_sources} + hiredis.def + ) +ENDIF() + +ADD_LIBRARY(hiredis SHARED ${hiredis_sources}) + SET_TARGET_PROPERTIES(hiredis PROPERTIES VERSION "${HIREDIS_SONAME}") @@ -46,7 +55,7 @@ CONFIGURE_FILE(hiredis.pc.in hiredis.pc @ONLY) INSTALL(TARGETS hiredis DESTINATION "${CMAKE_INSTALL_LIBDIR}") -INSTALL(FILES hiredis.h read.h sds.h async.h +INSTALL(FILES hiredis.h read.h sds.h async.h alloc.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hiredis) INSTALL(DIRECTORY adapters -- cgit v1.2.3