Do create installation directories that already exist

Reverts 71329a250b.

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.
This commit is contained in:
Fabian Homborg 2019-03-12 18:49:08 +01:00
parent 8a0d794337
commit bfb61879cd

View file

@ -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()
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"