CMakeFindFrameworks.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # - helper module to find OSX frameworks
  2. #=============================================================================
  3. # Copyright 2003-2009 Kitware, Inc.
  4. #
  5. # Distributed under the OSI-approved BSD License (the "License");
  6. # see accompanying file Copyright.txt for details.
  7. #
  8. # This software is distributed WITHOUT ANY WARRANTY; without even the
  9. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. # See the License for more information.
  11. #=============================================================================
  12. # (To distribute this file outside of CMake, substitute the full
  13. # License text for the above reference.)
  14. IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
  15. SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
  16. MACRO(CMAKE_FIND_FRAMEWORKS fwk)
  17. SET(${fwk}_FRAMEWORKS)
  18. IF(APPLE)
  19. FOREACH(dir
  20. ~/Library/Frameworks/${fwk}.framework
  21. /Library/Frameworks/${fwk}.framework
  22. /System/Library/Frameworks/${fwk}.framework
  23. /Network/Library/Frameworks/${fwk}.framework)
  24. IF(EXISTS ${dir})
  25. SET(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
  26. ENDIF(EXISTS ${dir})
  27. ENDFOREACH(dir)
  28. ENDIF(APPLE)
  29. ENDMACRO(CMAKE_FIND_FRAMEWORKS)
  30. ENDIF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)