Properly rename argon2 symbols on Win32 builds

This commit is contained in:
Jonathan White 2018-02-27 21:34:54 -05:00
parent 3c274135ce
commit e17bee8e31
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -21,7 +21,9 @@ if (MINGW)
message(STATUS "Patching libargon2...\n")
execute_process(COMMAND objcopy
--redefine-sym argon2_hash=libargon2_argon2_hash
--redefine-sym _argon2_hash=_libargon2_argon2_hash
--redefine-sym argon2_error_message=libargon2_argon2_error_message
--redefine-sym _argon2_error_message=_libargon2_argon2_error_message
${ARGON2_SYS_LIBRARIES} ${CMAKE_BINARY_DIR}/libargon2_patched.a
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
find_library(ARGON2_LIBRARIES libargon2_patched.a PATHS ${CMAKE_BINARY_DIR} NO_DEFAULT_PATH)