diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 11 insertions, 2 deletions
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 |