Skip to content

Commit

Permalink
add module definition file, let vs2019 build correct binary via cmake
Browse files Browse the repository at this point in the history
Configure for Windows 32 bit:
1. open 'x86 Native Tools Command Prompt for VS 2019', navigate to your source directory
2. configure with cmake:
  cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/out32/hiredis/ .

Configure for Windows 64 bit:
1. open 'x64 Native Tools Command Prompt for VS 2019', navigate to your source directory
2. configure with cmake:
  cmake -G "Visual Studio 16 2019" -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/out64/hiredis/ .

Finally, build & install:
  msbuild.exe /p:Configuration=RelWithDebInfo ALL_BUILD.vcxproj
  msbuild.exe /p:Configuration=RelWithDebInfo INSTALL.vcxproj
  • Loading branch information
Qiongzhu Wan committed Feb 6, 2020
1 parent 51f8e6f commit 3e6149c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ADD_LIBRARY(hiredis SHARED
read.c
sds.c
sockcompat.c
alloc.c)
alloc.c
hiredis.def)

SET_TARGET_PROPERTIES(hiredis
PROPERTIES
Expand Down
36 changes: 36 additions & 0 deletions hiredis.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
EXPORTS
redisAppendCommand
redisAppendCommandArgv
redisAppendFormattedCommand
redisBufferRead
redisBufferWrite
redisCommand
redisCommand
redisCommandArgv
redisConnect
redisConnectBindNonBlock
redisConnectBindNonBlockWithReuse
redisConnectFd
redisConnectNonBlock
redisConnectUnix
redisConnectUnixNonBlock
redisConnectUnixWithTimeout
redisConnectWithOptions
redisConnectWithTimeout
redisEnableKeepAlive
redisFormatCommand
redisFormatCommandArgv
redisFormatSdsCommandArgv
redisFree
redisFreeCommand
redisFreeKeepFd
redisFreeSdsCommand
redisGetReply
redisGetReplyFromReader
redisReaderCreate
redisReconnect
redisSetTimeout
redisvAppendCommand
redisvCommand
redisvFormatCommand
freeReplyObject

0 comments on commit 3e6149c

Please sign in to comment.