mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 16:51:15 -03: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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user