Skip to content

Commit da77db5

Browse files
committed
Revert "[cmake] Use GNUInstallDirs to support custom installation dirs."
https://lab.llvm.org/buildbot/#/builders/46/builds/21146 Still have this odd error, not sure how to reproduce, so I will just try breaking up my patch. This reverts commit 4a678f8.
1 parent 4a678f8 commit da77db5

File tree

36 files changed

+68
-96
lines changed

36 files changed

+68
-96
lines changed

clang-tools-extra/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include(CMakeDependentOption)
2-
include(GNUInstallDirs)
32

43
option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
54
"Include static analyzer checks in clang-tidy" ON)

clang-tools-extra/clang-doc/tool/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ target_link_libraries(clang-doc
1919
)
2020

2121
install(FILES ../assets/clang-doc-default-stylesheet.css
22-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
22+
DESTINATION share/clang
2323
COMPONENT clang-doc)
2424

2525
install(FILES ../assets/index.js
26-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
26+
DESTINATION share/clang
2727
COMPONENT clang-doc)

clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ target_link_libraries(find-all-symbols
2020
)
2121

2222
install(PROGRAMS run-find-all-symbols.py
23-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
23+
DESTINATION share/clang
2424
COMPONENT find-all-symbols)

clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ target_link_libraries(clang-include-fixer
2121
)
2222

2323
install(PROGRAMS clang-include-fixer.el
24-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
24+
DESTINATION share/clang
2525
COMPONENT clang-include-fixer)
2626
install(PROGRAMS clang-include-fixer.py
27-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
27+
DESTINATION share/clang
2828
COMPONENT clang-include-fixer)

clang-tools-extra/clang-tidy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ add_subdirectory(utils)
113113

114114
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
115115
install(DIRECTORY .
116-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/clang-tidy"
116+
DESTINATION include/clang-tidy
117117
COMPONENT clang-tidy-headers
118118
FILES_MATCHING
119119
PATTERN "*.h"

clang-tools-extra/clang-tidy/tool/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ target_link_libraries(clang-tidy
5252

5353

5454
install(PROGRAMS clang-tidy-diff.py
55-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
55+
DESTINATION share/clang
5656
COMPONENT clang-tidy)
5757
install(PROGRAMS run-clang-tidy.py
58-
DESTINATION "${CMAKE_INSTALL_BINDIR}"
58+
DESTINATION bin
5959
COMPONENT clang-tidy
6060
RENAME run-clang-tidy)

clang-tools-extra/modularize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ clang_target_link_libraries(modularize
2323
)
2424

2525
install(TARGETS modularize
26-
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
26+
RUNTIME DESTINATION bin
2727
COMPONENT clang-extras)

clang/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
cmake_minimum_required(VERSION 3.13.4)
22

3-
include(GNUInstallDirs)
4-
53
# If we are not building as a part of LLVM, build Clang as an
64
# standalone project, using LLVM as an external library:
75
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
@@ -426,7 +424,7 @@ include_directories(BEFORE
426424

427425
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
428426
install(DIRECTORY include/clang include/clang-c
429-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
427+
DESTINATION include
430428
COMPONENT clang-headers
431429
FILES_MATCHING
432430
PATTERN "*.def"
@@ -435,7 +433,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
435433
)
436434

437435
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
438-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
436+
DESTINATION include
439437
COMPONENT clang-headers
440438
FILES_MATCHING
441439
PATTERN "CMakeFiles" EXCLUDE
@@ -455,7 +453,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
455453

456454
add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
457455
install(PROGRAMS utils/bash-autocomplete.sh
458-
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
456+
DESTINATION share/clang
459457
COMPONENT bash-autocomplete)
460458
if(NOT LLVM_ENABLE_IDE)
461459
add_llvm_install_targets(install-bash-autocomplete

clang/cmake/modules/AddClang.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include(GNUInstallDirs)
21
include(LLVMDistributionSupport)
32

43
function(clang_tablegen)
@@ -121,7 +120,7 @@ macro(add_clang_library name)
121120
${export_to_clangtargets}
122121
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
123122
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
124-
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
123+
RUNTIME DESTINATION bin)
125124

126125
if (NOT LLVM_ENABLE_IDE)
127126
add_llvm_install_targets(install-${lib}
@@ -160,7 +159,7 @@ macro(add_clang_tool name)
160159
get_target_export_arg(${name} Clang export_to_clangtargets)
161160
install(TARGETS ${name}
162161
${export_to_clangtargets}
163-
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
162+
RUNTIME DESTINATION bin
164163
COMPONENT ${name})
165164

166165
if(NOT LLVM_ENABLE_IDE)

clang/tools/c-index-test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
4949
set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
5050
"@executable_path/../../lib")
5151
else()
52-
set(INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
52+
set(INSTALL_DESTINATION bin)
5353
endif()
5454

5555
install(TARGETS c-index-test

0 commit comments

Comments
 (0)