File tree 2 files changed +30
-1
lines changed
2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ math(EXPR LDC_LLVM_VER ${LLVM_VERSION_MAJOR}*100+${LLVM_VERSION_MINOR})
20
20
#
21
21
find_package (LibConfig++ REQUIRED)
22
22
23
+ #
24
+ # Get info about used Linux distribution.
25
+ #
26
+ include (GetLinuxDistribution)
27
+
23
28
#
24
29
# Main configuration.
25
30
#
@@ -431,5 +436,9 @@ install(FILES ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}_install.conf DESTINATION ${CO
431
436
install (FILES ${PROJECT_BINARY_DIR} /bin/${LDC_EXE} _install.rebuild.conf DESTINATION ${CONF_INST_DIR} RENAME ${LDC_EXE} .rebuild.conf)
432
437
433
438
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
434
- install (DIRECTORY bash_completion.d DESTINATION ${CONF_INST_DIR} )
439
+ set (BASH_COMPLETION_INST_DIR "${CONF_INST_DIR} /bash_completion.d" )
440
+ if (LINUX_DISTRIBUTION_IS_GENTOO)
441
+ set (BASH_COMPLETION_INST_DIR "/usr/share/bash-completion" )
442
+ endif ()
443
+ install (DIRECTORY bash_completion.d/ DESTINATION ${BASH_COMPLETION_INST_DIR} )
435
444
endif ()
Original file line number Diff line number Diff line change
1
+ # Gets the linux distribution
2
+ #
3
+ # This module defines:
4
+ # LINUX_DISTRIBUTION_IS_REDHAT
5
+ # LINUX_DISTRIBUTION_IS_GENTOO
6
+
7
+ # Check: Can /usr/bin/lsb_release -a be used?
8
+
9
+ set (LINUX_DISTRIBUTION_IS_REDHAT FALSE )
10
+ set (LINUX_DISTRIBUTION_IS_GENTOO FALSE )
11
+
12
+ if (UNIX )
13
+ if (EXISTS "/etc/redhat-release" )
14
+ set (LINUX_DISTRIBUTION_IS_REDHAT TRUE )
15
+ endif ()
16
+
17
+ if (EXISTS "/etc/gentoo-release" )
18
+ set (LINUX_DISTRIBUTION_IS_GENTOO TRUE )
19
+ endif ()
20
+ endif ()
You can’t perform that action at this time.
0 commit comments