You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

  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()
  27. endforeach()
  28. endif()
  29. endmacro()
  30. endif()