rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
194 stars 55 forks source link

Manage installation of dependent libraries on Windows MSVC #1402

Open rrrooommmaaa opened 3 years ago

rrrooommmaaa commented 3 years ago

Description

when running cmake --install . on Windows MSVC build, librnp-0.dll is copied over to C:\Program Files\RNP\lib. However, dependent libraries (botan.dll, bz2.dll, getopt.dll, json-c.dll and zlib1.dll) are not copied anywhere, so it is problematic to find them and set path to them.

Expected Behavior

These files should appear in C:\Program Files\RNP\lib: librnp-0.dll botan.dll bz2.dll getopt.dll json-c.dll zlib1.dll

Actual Behavior

Only this file appeared in C:\Program Files\RNP\lib: librnp-0.dll

antonsviridenko commented 3 years ago

There is a MXE project that provides cross-build environment for building many free/opensource libraries for Windows, and it has some existing tools for copying DLL dependencies

https://github.com/mxe/mxe/blob/master/tools/copydlldeps.sh

https://github.com/mxe/mxe/blob/master/tools/copydlldeps.py

Can be reused as is or used as a reference.

ronaldtse commented 3 years ago

CMake seems to be able to do this: https://discourse.cmake.org/t/copying-dependent-dlls-to-executable-directory/852