manually install msvc DLLs with Interface/DS/AC

This commit is contained in:
Stephen Birarda 2016-01-22 14:18:45 -08:00
parent 055a0ff7d9
commit 47a630f0ad
3 changed files with 39 additions and 0 deletions

View file

@ -70,5 +70,6 @@ macro(install_beside_console)
set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR})
set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT})
manually_install_ssl_eay()
manually_install_msvc()
endmacro()

View file

@ -0,0 +1,37 @@
#
# ManuallyInstallMSVC.cmake
# cmake/macros
#
# Copyright 2016 High Fidelity, Inc.
# Created by Stephen Birarda on January 22nd, 2016
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
# On windows fixup_bundle does not find msvcr120.dll and msvcp120.dll that our targets need to be re-distributable.
# We use this macro to find them and manually install them beside the targets
macro(manually_install_msvc)
if (WIN32)
# look for the msvcr DLLs required by this target
find_path(MSVC_DLL_PATH msvcr120.dll PATHS "C:/Windows/SysWOW64" NO_DEFAULT_PATH)
if (MSVC_DLL_PATH-NOTFOUND)
# we didn't get the path to the DLLs - on production or PR build this is a fail
if (PRODUCTION_BUILD OR PR_BUILD)
message(FATAL_ERROR "Did not find MSVC_DLL_PATH for msvcr120.dll and msvcp120.dll.\
Both are required to package re-distributable installer."
)
endif ()
else ()
# manually install the two DLLs for this component
install(
FILES "${MSVC_DLL_PATH}/msvcr120.dll" "${MSVC_DLL_PATH}/msvcp120.dll"
DESTINATION ${TARGET_INSTALL_DIR}
COMPONENT ${TARGET_INSTALL_COMPONENT}
)
endif ()
endif ()
endmacro()

View file

@ -267,6 +267,7 @@ if (WIN32)
set(TARGET_INSTALL_DIR ${INTERFACE_INSTALL_DIR})
set(TARGET_INSTALL_COMPONENT ${CLIENT_COMPONENT})
manually_install_ssl_eay()
manually_install_msvc()
package_libraries_for_deployment()
endif()