mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00: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
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue