Install : Locate and add Boost DLLs to install (#6917)

* Install : Locate and add Boost DLLs to install
* Fixes by cmake-format

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Magne Sjaastad 2020-11-05 02:48:57 -05:00 committed by GitHub
parent 51359a0cda
commit 5f1ea10654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -702,6 +702,30 @@ if(RESINSIGHT_PRIVATE_INSTALL)
endif(OPENSSL_FOUND)
endif(RESINSIGHT_BUNDLE_OPENSSL)
# Boost
find_package(Boost REQUIRED filesystem system)
get_property(
_filepath
TARGET "Boost::filesystem"
PROPERTY LOCATION_RELEASE)
message("_filepath: ${_filepath}")
# The location of Boost is based on the file structure as installed by vcpkg
# The DLLs are located in the /bin folder
get_filename_component(_dir ${_filepath} PATH)
string(REPLACE "/lib" "/bin" _dir ${_dir})
# Use file clobbing, as the dlls are decorated with local compiler info
file(GLOB RI_BOOST_DLLS ${_dir}/boost_filesystem*.dll)
message("RI_BOOST_DLLS : ${RI_BOOST_DLLS}")
install(
FILES ${RI_BOOST_DLLS}
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}
CONFIGURATIONS Release RelWithDebInfo)
# CRT
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
set(CMAKE_INSTALL_OPENMP_LIBRARIES ON)