From bfb61879cdebe7df77ebaf4a41f688d29f47411e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 12 Mar 2019 18:49:08 +0100 Subject: [PATCH] Do create installation directories that already exist Reverts 71329a250b09dfacaca48fb69c69fe59eeb0c15a. That tried to fix problems with pkgconfig by not recreating it. Instead, use the function we already have for not trying too hard to create a directory. Fixes #5735. --- cmake/Install.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/Install.cmake b/cmake/Install.cmake index be7d10b23..f1537344a 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -53,9 +53,7 @@ ENDIF() # Define a function to help us create directories. FUNCTION(FISH_CREATE_DIRS) FOREACH(dir ${ARGV}) - IF(NOT EXISTS ${CMAKE_INSTALL_PREFIX}/${dir}) - INSTALL(DIRECTORY DESTINATION ${dir}) - ENDIF() + INSTALL(DIRECTORY DESTINATION ${dir}) ENDFOREACH(dir) ENDFUNCTION(FISH_CREATE_DIRS) @@ -113,9 +111,9 @@ INSTALL(FILES share/config.fish # -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_completionsdir) # -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_functionsdir) # -$v $(INSTALL) -m 755 -d $(DESTDIR)$(extra_confdir) -FISH_CREATE_DIRS(${rel_datadir}/pkgconfig) # Don't try too hard to create these directories as they may be outside our writeable area # https://github.com/Homebrew/homebrew-core/pull/2813 +FISH_TRY_CREATE_DIRS(${rel_datadir}/pkgconfig) FISH_TRY_CREATE_DIRS(${extra_completionsdir} ${extra_functionsdir} ${extra_confdir}) # @echo "Installing pkgconfig file"