CMake: Install DLL dependencies on Windows

The Windows build of Pioneer is linked dynamically to the DLLs of its
dependencies. For Pioneer to work correctly, these DLLs need to be
present in the system. We then make sure that when Pioneer is installed,
these DLLs are copied to the executable's directory.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
master
Paul Cercueil 2018-08-28 19:35:28 +02:00
parent fdc46b53ce
commit 70153621ab
1 changed files with 6 additions and 0 deletions

View File

@ -237,3 +237,9 @@ install(DIRECTORY data
PATTERN "listdata.*" EXCLUDE
PATTERN "Makefile.am" EXCLUDE
)
if (WIN32)
install(CODE "include(BundleUtilities)
fixup_bundle(\"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/pioneer.exe\" \"\" \"${CMAKE_PROGRAM_PATH}\")"
COMPONENT Runtime)
endif (WIN32)