From 0b144baa797760ca24116e432273a308709b676d Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 21 Mar 2021 12:39:17 -0700 Subject: [PATCH] Switch fish.pc dependency from FBVF file to CHECK-FBVF target Previously, both fish.pc and libfish had generating the FISH-BUILD-VERSION-FILE attached as a command. In principle they could both try to run the command simultaneously and now CMake complains about this with the Xcode generator. Switch to having fish.pc depend on the CHECK-FISH-BUILD-VERSION-FILE as a target instead of a command. This allows it to participate in dependency resolution and CMake will succeed again. Fixes #7838 (cherry picked from commit 1b950f5f3b2e5db88b3c2d694b5b25b0c284419c) --- cmake/Install.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Install.cmake b/cmake/Install.cmake index 5574b7894..af64029bd 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -110,7 +110,7 @@ add_custom_command(OUTPUT fish.pc COMMAND printf "Version: " >> fish.pc COMMAND sed 's/FISH_BUILD_VERSION=//\;s/\"//g' ${FBVF} >> fish.pc WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FBVF} ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion) + DEPENDS CHECK-FISH-BUILD-VERSION-FILE ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion) add_custom_target(build_fish_pc ALL DEPENDS fish.pc)