From 7ae381533e0533c3cb5d6e1c0180cc131252638e Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Wed, 21 May 2014 11:16:19 +0200 Subject: [PATCH] Improved CMake script * Instead of configuring Xcode templates directly to /Library the files are first saved in CMAKE_CURRENT_BINARY_DIR * This avoid running CMake as root on some systems --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e63611e5a..39498fc5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -277,13 +277,13 @@ elseif(SFML_OS_MACOSX) # install the Xcode templates if requested if(SFML_INSTALL_XCODE_TEMPLATES) - install(DIRECTORY tools/xcode/templates/SFML - DESTINATION /Library/Developer/Xcode/Templates - PATTERN "*.in" EXCLUDE) configure_file( "tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in" - "/Library/Developer/Xcode/Templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist" + "${CMAKE_CURRENT_BINARY_DIR}/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist" @ONLY) + install(DIRECTORY "tools/xcode/templates/SFML" "${CMAKE_CURRENT_BINARY_DIR}/tools/xcode/templates/SFML" + DESTINATION /Library/Developer/Xcode/Templates + PATTERN "*.in" EXCLUDE) endif() elseif(SFML_OS_IOS)