diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.13.4) +include(GNUInstallDirs) + # Add path for custom modules. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -11,6 +13,7 @@ # using LLVM as an external library. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(lldb) + include(LLDBStandalone) set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -1,3 +1,5 @@ +include(GNUInstallDirs) + function(lldb_tablegen) # Syntax: # lldb_tablegen output-file [tablegen-arg ...] SOURCE source-file @@ -113,7 +115,7 @@ endif() # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS install(TARGETS ${name} COMPONENT ${name} - RUNTIME DESTINATION bin + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION ${install_dest} ARCHIVE DESTINATION ${install_dest} FRAMEWORK DESTINATION ${install_dest}) diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -226,7 +226,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(DIRECTORY include/ COMPONENT lldb-headers - DESTINATION include + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING PATTERN "*.h" PATTERN ".cmake" EXCLUDE @@ -234,7 +234,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ COMPONENT lldb-headers - DESTINATION include + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" FILES_MATCHING PATTERN "*.h" PATTERN ".cmake" EXCLUDE