[lldb/CMake] Fix `install` for multi-configuration generators.

For multi-generator builds like MSVC and Xcode, the install source and
destination of the lldb-python-scripts target contains configuration
dependent paths and therefore need to be substituted.

Differential revision: https://reviews.llvm.org/D76827
This commit is contained in:
Jonas Devlieghere 2020-03-26 09:51:04 -07:00
parent 4dc8472942
commit 17e4c38739
1 changed files with 2 additions and 0 deletions

View File

@ -224,6 +224,8 @@ if (LLDB_ENABLE_PYTHON)
else() else()
set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH}) set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
endif() endif()
string(REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_INSTALL_PATH})
string(REPLACE ${CMAKE_CFG_INTDIR} "\$\{CMAKE_INSTALL_CONFIG_NAME\}" lldb_python_build_path ${lldb_python_build_path})
add_custom_target(lldb-python-scripts) add_custom_target(lldb-python-scripts)
add_dependencies(lldb-python-scripts finish_swig) add_dependencies(lldb-python-scripts finish_swig)
install(DIRECTORY ${lldb_python_build_path}/../ install(DIRECTORY ${lldb_python_build_path}/../