Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/AddLLDB.cmake
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | if(LLDB_BUILD_FRAMEWORK) | ||||
set(resource_dir "/Resources") | set(resource_dir "/Resources") | ||||
set(resource_dots "../") | set(resource_dots "../") | ||||
endif() | endif() | ||||
string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR}) | string(REGEX REPLACE "[^/]+" ".." _dots ${LLDB_FRAMEWORK_INSTALL_DIR}) | ||||
set_target_properties(${name} PROPERTIES | set_target_properties(${name} PROPERTIES | ||||
RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:liblldb>${resource_dir} | RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:liblldb>${resource_dir} | ||||
BUILD_WITH_INSTALL_RPATH On | BUILD_WITH_INSTALL_RPATH On | ||||
INSTALL_RPATH "@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}") | INSTALL_RPATH "@loader_path/../../../${resource_dots}${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}") | ||||
# For things inside the framework we don't need functional install targets | |||||
# because CMake copies the resources and headers from the build directory. | |||||
# But we still need this target to exist in order to use the | |||||
# LLVM_DISTRIBUTION_COMPONENTS build option. We also need the | |||||
# install-liblldb target to depend on this tool, so that it gets put into | |||||
# the Resources directory before the framework is installed. | |||||
if(ARG_GENERATE_INSTALL) | |||||
add_custom_target(install-${name} DEPENDS ${name}) | |||||
add_dependencies(install-liblldb ${name}) | |||||
add_custom_target(install-${name}-stripped DEPENDS ${name}) | |||||
add_dependencies(install-liblldb-stripped ${name}) | |||||
endif() | |||||
endif() | endif() | ||||
endif() | endif() | ||||
if(LLDB_BUILD_FRAMEWORK AND NOT ARG_INCLUDE_IN_SUITE) | if(LLDB_BUILD_FRAMEWORK AND NOT ARG_INCLUDE_IN_SUITE) | ||||
set_target_properties(${name} PROPERTIES | set_target_properties(${name} PROPERTIES | ||||
BUILD_WITH_INSTALL_RPATH On | BUILD_WITH_INSTALL_RPATH On | ||||
INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") | INSTALL_RPATH "@loader_path/../${LLDB_FRAMEWORK_INSTALL_DIR}") | ||||
endif() | endif() | ||||
if(ARG_GENERATE_INSTALL AND NOT (ARG_INCLUDE_IN_SUITE AND LLDB_BUILD_FRAMEWORK )) | if(ARG_GENERATE_INSTALL) | ||||
set(out_dir "bin") | |||||
if (LLDB_BUILD_FRAMEWORK AND ARG_INCLUDE_IN_SUITE) | |||||
set(out_dir ${LLDB_FRAMEWORK_INSTALL_DIR}/${LLDB_FRAMEWORK_RESOURCE_DIR}) | |||||
endif() | |||||
install(TARGETS ${name} | install(TARGETS ${name} | ||||
COMPONENT ${name} | COMPONENT ${name} | ||||
RUNTIME DESTINATION bin) | RUNTIME DESTINATION ${out_dir}) | ||||
if (NOT CMAKE_CONFIGURATION_TYPES) | if (NOT CMAKE_CONFIGURATION_TYPES) | ||||
add_llvm_install_targets(install-${name} | add_llvm_install_targets(install-${name} | ||||
DEPENDS ${name} | DEPENDS ${name} | ||||
COMPONENT ${name}) | COMPONENT ${name}) | ||||
endif() | endif() | ||||
endif() | endif() | ||||
if(ARG_INCLUDE_IN_SUITE AND LLDB_BUILD_FRAMEWORK) | if(ARG_INCLUDE_IN_SUITE AND LLDB_BUILD_FRAMEWORK) | ||||
Show All 24 Lines |