Skip to content

Instantly share code, notes, and snippets.

@blt
Forked from juniorz/sfml.rb
Last active December 17, 2015 11:59
Show Gist options
  • Select an option

  • Save blt/5606902 to your computer and use it in GitHub Desktop.

Select an option

Save blt/5606902 to your computer and use it in GitHub Desktop.

Revisions

  1. blt revised this gist May 19, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,7 @@ def install
    args = std_cmake_args
    args.delete '-DCMAKE_BUILD_TYPE=None'
    args.push '-DCMAKE_BUILD_TYPE=Release', '-DINSTALL_EXTERNAL_LIBS=FALSE'
    args.push '-DSFML_BUILD_FRAMEWORKS=TRUE', "-DCMAKE_INSTALL_FRAMEWORK_PREFIX=#{prefix}/Frameworks"

    args << '-DBUILD_SHARED_LIBS=FALSE' if build.include? 'static'

  2. blt revised this gist May 19, 2013. 1 changed file with 1 addition and 31 deletions.
    32 changes: 1 addition & 31 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -19,13 +19,6 @@ class Sfml < Formula
    # libsndfile depends on them (it is all or none)
    # flac, libogg, libvorbis

    option :universal
    option :static, 'Build Static Libraries'

    option :framework, 'Build Framework'

    def patches; end

    def install
    ENV.universal_binary if build.include? 'universal'

    @@ -34,13 +27,7 @@ def install
    args.push '-DCMAKE_BUILD_TYPE=Release', '-DINSTALL_EXTERNAL_LIBS=FALSE'

    args << '-DBUILD_SHARED_LIBS=FALSE' if build.include? 'static'
    args << '-DSFML_INSTALL_XCODE4_TEMPLATES=TRUE' if build.include? 'xcode'
    args << '-DSFML_BUILD_EXAMPLES=TRUE' if build.include? 'build-examples'

    if build.include? 'framework'
    args.push '-DSFML_BUILD_FRAMEWORKS=TRUE', "-DCMAKE_INSTALL_FRAMEWORK_PREFIX=#{prefix}/Frameworks"
    end


    system 'cmake', '.', *args
    system 'make install'
    end
    @@ -56,21 +43,4 @@ def caveats

    msg
    end

    private
    def framework_caveats; <<-EOS.undent
    SFML.framework was installed to:
    #{opt_prefix}/Frameworks/SFML.framework
    To use this Framework with IDEs it must be linked
    to the standard OS X location:
    sudo ln -s #{opt_prefix}/Frameworks/SFML.framework /Library/Frameworks
    EOS
    end

    def examples_caveats; <<-EOS.undent
    The examples were installed to:
    #{opt_prefix}/share/sfml/examples
    EOS
    end
    end
  3. blt revised this gist May 19, 2013. 1 changed file with 1 addition and 84 deletions.
    85 changes: 1 addition & 84 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -23,11 +23,8 @@ class Sfml < Formula
    option :static, 'Build Static Libraries'

    option :framework, 'Build Framework'
    option :xcode, 'Install XCode 4 Templates (requires sudo to install)'

    option 'build-examples', 'Build Examples'

    def patches; DATA; end
    def patches; end

    def install
    ENV.universal_binary if build.include? 'universal'
    @@ -77,83 +74,3 @@ def examples_caveats; <<-EOS.undent
    EOS
    end
    end

    __END__
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 4e7605a..e1bad9f 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -36,6 +36,9 @@ sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples,
    # add an option for building the API documentation
    sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")

    +# set an option for install included external libraries
    +sfml_set_option(INSTALL_EXTERNAL_LIBS TRUE BOOL "TRUE to install external libraries (sndfile and openal)")
    +
    # Mac OS X specific options
    if(MACOSX)
    # add an option to build frameworks instead of dylibs (release only)
    @@ -215,18 +218,22 @@ install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake
    install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
    install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})

    -if(WINDOWS)
    - if(ARCH_32BITS)
    - install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    - elseif(ARCH_64BITS)
    - install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    - endif()
    -elseif(MACOSX)
    - install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    +if(INSTALL_EXTERNAL_LIBS)
    + if(WINDOWS)
    + if(ARCH_32BITS)
    + install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    + elseif(ARCH_64BITS)
    + install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    + endif()
    + elseif(MACOSX)
    + install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    + endif()
    +endif()

    - if(SFML_INSTALL_XCODE4_TEMPLATES)
    - install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    - endif()
    +if(MACOSX)
    + if(SFML_INSTALL_XCODE4_TEMPLATES)
    + install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    + endif()
    endif()
    diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
    index 777a72e..99cc3e2 100644
    --- a/examples/CMakeLists.txt
    +++ b/examples/CMakeLists.txt
    @@ -13,6 +13,10 @@ if(WINDOWS)
    add_subdirectory(win32)
    elseif(LINUX)
    add_subdirectory(X11)
    -elseif(MACOSX)
    - add_subdirectory(cocoa)
    + elseif(MACOSX)
    + if(CMAKE_OSX_SYSROOT STREQUAL "" OR OSX_DEVELOPER_ROOT STREQUAL "")
    + message(STATUS "Could not find XCode: skipping cocoa example")
    + else()
    + add_subdirectory(cocoa)
    + endif()
    endif()
    diff --git a/cmake/Config.cmake b/cmake/Config.cmake
    index 7fed4ac..fd2b4b6 100644
    --- a/cmake/Config.cmake
    +++ b/cmake/Config.cmake
    @@ -67,5 +67,5 @@ endif()
    if(WINDOWS)
    set(INSTALL_MISC_DIR .)
    elseif(UNIX)
    - set(INSTALL_MISC_DIR share/SFML)
    + set(INSTALL_MISC_DIR share/sfml)
    endif()
  4. blt revised this gist May 19, 2013. 1 changed file with 64 additions and 67 deletions.
    131 changes: 64 additions & 67 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,9 @@
    class Sfml < Formula
    homepage 'http://www.sfml-dev.org'

    version '2.0-rc'
    url 'https://github.com/LaurentGomila/SFML/archive/2.0-rc.zip'
    sha1 '71bdbd9abe46fe4f87c09175cf2a25246b7251c8'

    head 'https://github.com/LaurentGomila/SFML/archive/master.zip'

    version '2.0'
    url 'http://www.sfml-dev.org/download/sfml/2.0/SFML-2.0-sources.zip'
    sha1 'ff8cf290f49e1a1d8517a4a344e9214139da462f'

    depends_on 'cmake' => :build
    depends_on 'freetype' => :build
    @@ -87,76 +84,76 @@ def examples_caveats; <<-EOS.undent
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -36,6 +36,9 @@ sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples,
    # add an option for building the API documentation
    sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")

    +# set an option for install included external libraries
    +sfml_set_option(INSTALL_EXTERNAL_LIBS TRUE BOOL "TRUE to install external libraries (sndfile and openal)")
    +
    # Mac OS X specific options
    if(MACOSX)
    # add an option to build frameworks instead of dylibs (release only)
    # add an option for building the API documentation
    sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")

    +# set an option for install included external libraries
    +sfml_set_option(INSTALL_EXTERNAL_LIBS TRUE BOOL "TRUE to install external libraries (sndfile and openal)")
    +
    # Mac OS X specific options
    if(MACOSX)
    # add an option to build frameworks instead of dylibs (release only)
    @@ -215,18 +218,22 @@ install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake
    install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
    install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})

    -if(WINDOWS)
    - if(ARCH_32BITS)
    - install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    - elseif(ARCH_64BITS)
    - install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    - endif()
    -elseif(MACOSX)
    - install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    +if(INSTALL_EXTERNAL_LIBS)
    + if(WINDOWS)
    + if(ARCH_32BITS)
    + install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    + elseif(ARCH_64BITS)
    + install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    + endif()
    + elseif(MACOSX)
    + install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    + endif()
    +endif()

    - if(SFML_INSTALL_XCODE4_TEMPLATES)
    - install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    - endif()
    +if(MACOSX)
    + if(SFML_INSTALL_XCODE4_TEMPLATES)
    + install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    + endif()
    endif()
    install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
    install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})

    -if(WINDOWS)
    - if(ARCH_32BITS)
    - install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    - elseif(ARCH_64BITS)
    - install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    - endif()
    -elseif(MACOSX)
    - install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    +if(INSTALL_EXTERNAL_LIBS)
    + if(WINDOWS)
    + if(ARCH_32BITS)
    + install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    + elseif(ARCH_64BITS)
    + install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    + endif()
    + elseif(MACOSX)
    + install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    + endif()
    +endif()

    - if(SFML_INSTALL_XCODE4_TEMPLATES)
    - install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    - endif()
    +if(MACOSX)
    + if(SFML_INSTALL_XCODE4_TEMPLATES)
    + install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    + endif()
    endif()
    diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
    index 777a72e..99cc3e2 100644
    --- a/examples/CMakeLists.txt
    +++ b/examples/CMakeLists.txt
    @@ -13,6 +13,10 @@ if(WINDOWS)
    add_subdirectory(win32)
    elseif(LINUX)
    add_subdirectory(win32)
    elseif(LINUX)
    add_subdirectory(X11)
    -elseif(MACOSX)
    - add_subdirectory(cocoa)
    + elseif(MACOSX)
    + if(CMAKE_OSX_SYSROOT STREQUAL "" OR OSX_DEVELOPER_ROOT STREQUAL "")
    + message(STATUS "Could not find XCode: skipping cocoa example")
    + else()
    + add_subdirectory(cocoa)
    + endif()
    endif()
    -elseif(MACOSX)
    - add_subdirectory(cocoa)
    + elseif(MACOSX)
    + if(CMAKE_OSX_SYSROOT STREQUAL "" OR OSX_DEVELOPER_ROOT STREQUAL "")
    + message(STATUS "Could not find XCode: skipping cocoa example")
    + else()
    + add_subdirectory(cocoa)
    + endif()
    endif()
    diff --git a/cmake/Config.cmake b/cmake/Config.cmake
    index 7fed4ac..fd2b4b6 100644
    --- a/cmake/Config.cmake
    +++ b/cmake/Config.cmake
    @@ -67,5 +67,5 @@ endif()
    if(WINDOWS)
    set(INSTALL_MISC_DIR .)
    elseif(UNIX)
    - set(INSTALL_MISC_DIR share/SFML)
    + set(INSTALL_MISC_DIR share/sfml)
    endif()
    if(WINDOWS)
    set(INSTALL_MISC_DIR .)
    elseif(UNIX)
    - set(INSTALL_MISC_DIR share/SFML)
    + set(INSTALL_MISC_DIR share/sfml)
    endif()
  5. Reinaldo Junior revised this gist Jan 12, 2013. 1 changed file with 26 additions and 7 deletions.
    33 changes: 26 additions & 7 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -51,15 +51,34 @@ def install
    system 'make install'
    end

    def caveats; <<-EOS.undent
    SFML.framework was installed to:
    #{opt_prefix}/Frameworks/SFML.framework
    To use this Framework with IDEs it must be linked
    to the standard OS X location:
    sudo ln -s #{opt_prefix}/Frameworks/SFML.framework /Library/Frameworks
    def caveats
    msg = ""
    msg = <<-EOS.undent
    The CMake find-module is available at #{opt_prefix}/share/sfml/cmake/Modules/FindSFML.cmake
    You may need to copy it to #{HOMEBREW_PREFIX}/share/cmake/Modules
    EOS
    msg.concat framework_caveats if build.include? 'framework'
    msg.concat examples_caveats if build.include? 'build-examples'

    msg
    end

    private
    def framework_caveats; <<-EOS.undent
    SFML.framework was installed to:
    #{opt_prefix}/Frameworks/SFML.framework
    To use this Framework with IDEs it must be linked
    to the standard OS X location:
    sudo ln -s #{opt_prefix}/Frameworks/SFML.framework /Library/Frameworks
    EOS
    end

    def examples_caveats; <<-EOS.undent
    The examples were installed to:
    #{opt_prefix}/share/sfml/examples
    EOS
    end
    end

    __END__
  6. Reinaldo Junior revised this gist Jan 3, 2013. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -5,14 +5,15 @@

    class Sfml < Formula
    homepage 'http://www.sfml-dev.org'
    version '2.0-head'
    url 'https://github.com/LaurentGomila/SFML/archive/master.zip'
    # version '2.0-rc'
    # url 'https://github.com/LaurentGomila/SFML/archive/2.0-rc.zip'
    sha1 '781c0623bfed3703e43bff7adde46c9a3def3697'

    depends_on 'cmake' => :build
    version '2.0-rc'
    url 'https://github.com/LaurentGomila/SFML/archive/2.0-rc.zip'
    sha1 '71bdbd9abe46fe4f87c09175cf2a25246b7251c8'

    head 'https://github.com/LaurentGomila/SFML/archive/master.zip'


    depends_on 'cmake' => :build
    depends_on 'freetype' => :build
    depends_on 'jpeg' => :build
    depends_on 'glew' => :build
  7. Reinaldo Junior revised this gist Jan 3, 2013. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -129,3 +129,14 @@ def caveats; <<-EOS.undent
    + add_subdirectory(cocoa)
    + endif()
    endif()
    diff --git a/cmake/Config.cmake b/cmake/Config.cmake
    index 7fed4ac..fd2b4b6 100644
    --- a/cmake/Config.cmake
    +++ b/cmake/Config.cmake
    @@ -67,5 +67,5 @@ endif()
    if(WINDOWS)
    set(INSTALL_MISC_DIR .)
    elseif(UNIX)
    - set(INSTALL_MISC_DIR share/SFML)
    + set(INSTALL_MISC_DIR share/sfml)
    endif()
  8. Reinaldo Junior revised this gist Jan 3, 2013. 1 changed file with 131 additions and 1 deletion.
    132 changes: 131 additions & 1 deletion sfml.rb
    Original file line number Diff line number Diff line change
    @@ -1 +1,131 @@
    # Creating the gist
    require 'formula'

    # Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
    # PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!

    class Sfml < Formula
    homepage 'http://www.sfml-dev.org'
    version '2.0-head'
    url 'https://github.com/LaurentGomila/SFML/archive/master.zip'
    # version '2.0-rc'
    # url 'https://github.com/LaurentGomila/SFML/archive/2.0-rc.zip'
    sha1 '781c0623bfed3703e43bff7adde46c9a3def3697'

    depends_on 'cmake' => :build

    depends_on 'freetype' => :build
    depends_on 'jpeg' => :build
    depends_on 'glew' => :build
    depends_on 'libsndfile' => :build

    # libsndfile depends on them (it is all or none)
    # flac, libogg, libvorbis

    option :universal
    option :static, 'Build Static Libraries'

    option :framework, 'Build Framework'
    option :xcode, 'Install XCode 4 Templates (requires sudo to install)'

    option 'build-examples', 'Build Examples'

    def patches; DATA; end

    def install
    ENV.universal_binary if build.include? 'universal'

    args = std_cmake_args
    args.delete '-DCMAKE_BUILD_TYPE=None'
    args.push '-DCMAKE_BUILD_TYPE=Release', '-DINSTALL_EXTERNAL_LIBS=FALSE'

    args << '-DBUILD_SHARED_LIBS=FALSE' if build.include? 'static'
    args << '-DSFML_INSTALL_XCODE4_TEMPLATES=TRUE' if build.include? 'xcode'
    args << '-DSFML_BUILD_EXAMPLES=TRUE' if build.include? 'build-examples'

    if build.include? 'framework'
    args.push '-DSFML_BUILD_FRAMEWORKS=TRUE', "-DCMAKE_INSTALL_FRAMEWORK_PREFIX=#{prefix}/Frameworks"
    end

    system 'cmake', '.', *args
    system 'make install'
    end

    def caveats; <<-EOS.undent
    SFML.framework was installed to:
    #{opt_prefix}/Frameworks/SFML.framework
    To use this Framework with IDEs it must be linked
    to the standard OS X location:
    sudo ln -s #{opt_prefix}/Frameworks/SFML.framework /Library/Frameworks
    EOS
    end
    end

    __END__
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 4e7605a..e1bad9f 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -36,6 +36,9 @@ sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples,
    # add an option for building the API documentation
    sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")

    +# set an option for install included external libraries
    +sfml_set_option(INSTALL_EXTERNAL_LIBS TRUE BOOL "TRUE to install external libraries (sndfile and openal)")
    +
    # Mac OS X specific options
    if(MACOSX)
    # add an option to build frameworks instead of dylibs (release only)
    @@ -215,18 +218,22 @@ install(FILES cmake/Modules/FindSFML.cmake DESTINATION ${INSTALL_MISC_DIR}/cmake
    install(FILES license.txt DESTINATION ${INSTALL_MISC_DIR})
    install(FILES readme.txt DESTINATION ${INSTALL_MISC_DIR})

    -if(WINDOWS)
    - if(ARCH_32BITS)
    - install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    - elseif(ARCH_64BITS)
    - install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    - install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    - endif()
    -elseif(MACOSX)
    - install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    +if(INSTALL_EXTERNAL_LIBS)
    + if(WINDOWS)
    + if(ARCH_32BITS)
    + install(FILES extlibs/bin/x86/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x86/openal32.dll DESTINATION bin)
    + elseif(ARCH_64BITS)
    + install(FILES extlibs/bin/x64/libsndfile-1.dll DESTINATION bin)
    + install(FILES extlibs/bin/x64/openal32.dll DESTINATION bin)
    + endif()
    + elseif(MACOSX)
    + install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
    + endif()
    +endif()

    - if(SFML_INSTALL_XCODE4_TEMPLATES)
    - install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    - endif()
    +if(MACOSX)
    + if(SFML_INSTALL_XCODE4_TEMPLATES)
    + install(DIRECTORY tools/xcode/templates/SFML DESTINATION /Library/Developer/Xcode/Templates)
    + endif()
    endif()
    diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
    index 777a72e..99cc3e2 100644
    --- a/examples/CMakeLists.txt
    +++ b/examples/CMakeLists.txt
    @@ -13,6 +13,10 @@ if(WINDOWS)
    add_subdirectory(win32)
    elseif(LINUX)
    add_subdirectory(X11)
    -elseif(MACOSX)
    - add_subdirectory(cocoa)
    + elseif(MACOSX)
    + if(CMAKE_OSX_SYSROOT STREQUAL "" OR OSX_DEVELOPER_ROOT STREQUAL "")
    + message(STATUS "Could not find XCode: skipping cocoa example")
    + else()
    + add_subdirectory(cocoa)
    + endif()
    endif()
  9. @juniorz juniorz created this gist Jan 3, 2013.
    1 change: 1 addition & 0 deletions sfml.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    # Creating the gist