Relaxed cmake installation rules regarding OS X framework dependencies

No longer install sndfile and/or freetype frameworks if SFML is built libraries not from the extlibs folder.
Related to #620 and Homebrew/homebrew#35479

Xcode templates are not updated yet to reflect that change since it involve toying with `install_name_tool` and is quite complex.
This commit is contained in:
Marco Antognini 2015-01-08 16:21:39 +01:00 committed by Lukas Dürrenberger
parent cac4d58b3d
commit 9f2aecf9cf

View File

@ -267,9 +267,14 @@ if(SFML_OS_WINDOWS)
elseif(SFML_OS_MACOSX) elseif(SFML_OS_MACOSX)
# install the non-standard frameworks SFML depends on # install extlibs dependencies only when used
install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) if("${SNDFILE_LIBRARY}" STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/sndfile.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX}) install(DIRECTORY extlibs/libs-osx/Frameworks/sndfile.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
endif()
if("${FREETYPE_LIBRARY}" STREQUAL "${SFML_SOURCE_DIR}/extlibs/libs-osx/Frameworks/freetype.framework")
install(DIRECTORY extlibs/libs-osx/Frameworks/freetype.framework DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
endif()
# install the Xcode templates if requested # install the Xcode templates if requested
if(SFML_INSTALL_XCODE_TEMPLATES) if(SFML_INSTALL_XCODE_TEMPLATES)