Automatically install dependent DLLs on Windows.

This commit is contained in:
levlam 2020-11-12 17:32:12 +03:00
parent 5ce7448f7a
commit f5dadbb1e5
2 changed files with 6 additions and 0 deletions

View File

@ -882,6 +882,9 @@ install(FILES "${TL_TD_AUTO_INCLUDE_DIR}/td/telegram/td_api.h" "${TL_TD_AUTO_INC
if (TD_ENABLE_JNI)
install(FILES td/tl/tl_jni_object.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/td/tl")
endif()
if (MSVC AND VCPKG_TOOLCHAIN)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/" DESTINATION "${CMAKE_INSTALL_BINDIR}" FILES_MATCHING PATTERN "*.dll")
endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file("TdConfigVersion.cmake"

View File

@ -105,3 +105,6 @@ install(TARGETS tdjni
LIBRARY DESTINATION bin
RUNTIME DESTINATION bin
)
if (MSVC AND VCPKG_TOOLCHAIN)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/" DESTINATION bin FILES_MATCHING PATTERN "*.dll" PATTERN "*.pdb")
endif()