summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFindFrameworks.cmake
diff options
context:
space:
mode:
authorDavid Keller <david.keller@litchis.fr>2016-07-30 14:48:53 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-02 14:41:40 (GMT)
commit9970cdcb59e5d02da68c195799146f9bc91816e7 (patch)
tree7fa1fd901a5f63e3737a6e3f50509d56a72eb1c3 /Modules/CMakeFindFrameworks.cmake
parentfd59f9ad519c1c311c54569133797d9061e90558 (diff)
downloadCMake-9970cdcb59e5d02da68c195799146f9bc91816e7.zip
CMake-9970cdcb59e5d02da68c195799146f9bc91816e7.tar.gz
CMake-9970cdcb59e5d02da68c195799146f9bc91816e7.tar.bz2
CMakeFindFrameworks: Allow custom framework locations
Read a variable to get non-standard locations to be searched, e.g. brew, port. Signed-off-by: David Keller <david.keller@litchis.fr>
Diffstat (limited to 'Modules/CMakeFindFrameworks.cmake')
-rw-r--r--Modules/CMakeFindFrameworks.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeFindFrameworks.cmake b/Modules/CMakeFindFrameworks.cmake
index 6a8bcd4..80eb003 100644
--- a/Modules/CMakeFindFrameworks.cmake
+++ b/Modules/CMakeFindFrameworks.cmake
@@ -3,6 +3,10 @@
# -------------------
#
# helper module to find OSX frameworks
+#
+# This module reads hints about search locations from variables::
+#
+# CMAKE_FIND_FRAMEWORK_EXTRA_LOCATIONS - Extra directories
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
@@ -24,9 +28,11 @@ if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
if(APPLE)
foreach(dir
~/Library/Frameworks/${fwk}.framework
+ /usr/local/Frameworks/${fwk}.framework
/Library/Frameworks/${fwk}.framework
/System/Library/Frameworks/${fwk}.framework
- /Network/Library/Frameworks/${fwk}.framework)
+ /Network/Library/Frameworks/${fwk}.framework
+ ${CMAKE_FIND_FRAMEWORK_EXTRA_LOCATIONS})
if(EXISTS ${dir})
set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
endif()