From 1963cccce1065d2d9329a956fb28501cf77f0d23 Mon Sep 17 00:00:00 2001 From: Pierre Wendling <50808272+FtZPetruska@users.noreply.github.com> Date: Sun, 12 Jun 2022 09:48:57 -0400 Subject: [PATCH] CMake: Fix XCode CMake config file. (#5787) As mentionned in libsdl-org/SDL_net#48 and libsdl-org/SDL_ttf#213: - Options needs to use `SHELL:` to avoid aggressive option de-duplication - Framework path needs to be quoted to support paths with spaces. --- Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake index 1b9037dbd..cc5cc4a8a 100644 --- a/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake +++ b/Xcode/SDL/pkg-support/resources/CMake/sdl2-config.cmake @@ -52,9 +52,9 @@ if(NOT TARGET SDL2::SDL2) add_library(SDL2::SDL2 INTERFACE IMPORTED) set_target_properties(SDL2::SDL2 PROPERTIES - INTERFACE_COMPILE_OPTIONS "-F;${SDL2_FRAMEWORK_PARENT_PATH}" + INTERFACE_COMPILE_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\"" INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}" - INTERFACE_LINK_OPTIONS "-F;${SDL2_FRAMEWORK_PARENT_PATH};-framework;SDL2" + INTERFACE_LINK_OPTIONS "SHELL:-F \"${SDL2_FRAMEWORK_PARENT_PATH}\";SHELL:-framework SDL2" COMPATIBLE_INTERFACE_BOOL "SDL2_SHARED" INTERFACE_SDL2_SHARED "ON" )