forked from OSchip/llvm-project
[lldb] Use `GNUInstallDirs` to support custom installation dirs.
Extracted from D99484. My new plan is to start from the outside and work inward. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D115570
This commit is contained in:
parent
a282ea4898
commit
9531146899
|
@ -1,5 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.13.4)
|
cmake_minimum_required(VERSION 3.13.4)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# Add path for custom modules.
|
# Add path for custom modules.
|
||||||
set(CMAKE_MODULE_PATH
|
set(CMAKE_MODULE_PATH
|
||||||
${CMAKE_MODULE_PATH}
|
${CMAKE_MODULE_PATH}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
function(lldb_tablegen)
|
function(lldb_tablegen)
|
||||||
# Syntax:
|
# Syntax:
|
||||||
# lldb_tablegen output-file [tablegen-arg ...] SOURCE source-file
|
# lldb_tablegen output-file [tablegen-arg ...] SOURCE source-file
|
||||||
|
@ -113,7 +115,7 @@ function(add_lldb_library name)
|
||||||
endif()
|
endif()
|
||||||
# RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
|
# RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
|
||||||
install(TARGETS ${name} COMPONENT ${name}
|
install(TARGETS ${name} COMPONENT ${name}
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
LIBRARY DESTINATION ${install_dest}
|
LIBRARY DESTINATION ${install_dest}
|
||||||
ARCHIVE DESTINATION ${install_dest}
|
ARCHIVE DESTINATION ${install_dest}
|
||||||
FRAMEWORK DESTINATION ${install_dest})
|
FRAMEWORK DESTINATION ${install_dest})
|
||||||
|
|
|
@ -231,7 +231,7 @@ include_directories(BEFORE
|
||||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||||
install(DIRECTORY include/
|
install(DIRECTORY include/
|
||||||
COMPONENT lldb-headers
|
COMPONENT lldb-headers
|
||||||
DESTINATION include
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||||
FILES_MATCHING
|
FILES_MATCHING
|
||||||
PATTERN "*.h"
|
PATTERN "*.h"
|
||||||
PATTERN ".cmake" EXCLUDE
|
PATTERN ".cmake" EXCLUDE
|
||||||
|
@ -239,7 +239,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||||
|
|
||||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
|
||||||
COMPONENT lldb-headers
|
COMPONENT lldb-headers
|
||||||
DESTINATION include
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||||
FILES_MATCHING
|
FILES_MATCHING
|
||||||
PATTERN "*.h"
|
PATTERN "*.h"
|
||||||
PATTERN ".cmake" EXCLUDE
|
PATTERN ".cmake" EXCLUDE
|
||||||
|
|
Loading…
Reference in New Issue