mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:05:39 +08:00
[cmake] Don't create installation directories that already exist
fish's cmake install routines were attempting to create system directories that already existed, an operation for which the permissions to do so may not be available (e.g. /usr/local/share/pkgconfig) This commit first checks if a directory exists before creating it.
This commit is contained in:
parent
9502ea8de3
commit
71329a250b
|
@ -54,7 +54,9 @@ ENDIF()
|
|||
# Define a function to help us create directories.
|
||||
FUNCTION(FISH_CREATE_DIRS)
|
||||
FOREACH(dir ${ARGV})
|
||||
INSTALL(DIRECTORY DESTINATION ${dir})
|
||||
IF(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/${dir})
|
||||
INSTALL(DIRECTORY DESTINATION ${dir})
|
||||
ENDIF()
|
||||
ENDFOREACH(dir)
|
||||
ENDFUNCTION(FISH_CREATE_DIRS)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user