[CMake] best practice for bundling 3rdparty dependencies in windows

tonka3100 at gmail.com tonka3100 at gmail.com
Sun Feb 19 14:02:35 EST 2017


Hey @everybody,

I have a question about best practice for app bundling especially 3rdparty libs. In Linux it is not some common to bundle 3rdparty libs with my application but in windows this is highly recommended. What’s a good way to bundle 3rdparty libs (mostly .dll, sometimes also .exe) in windows (maybe macos x has the same „problem“).

At the moment i use install(FILES …) to install the 3rdparty libs (i’ve tried to install imported target, but thats not possible :-( ). I use a cmake variable to activate (default is off) to copy 3rdparty libs to the install directory. The only other way i could go is to add a cpack_install_script file, but this is only availabe in cpack time.

So is there a better way to bundle 3rdparty libs or is this the recommended approach?

Thanks in advance
Tonka


More information about the CMake mailing list