summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorYves Starreveld <ystarrev@uwo.ca>2002-12-27 16:14:52 (GMT)
committerYves Starreveld <ystarrev@uwo.ca>2002-12-27 16:14:52 (GMT)
commit1bf59ded665ebd20b2633a43abab4a89d34fff4f (patch)
tree1f1cd415b9659fb71ca0df5d8a75373faf817398 /Modules
parentfc529540234fde2f5c5ed79fef6c53fbb761d88f (diff)
downloadCMake-1bf59ded665ebd20b2633a43abab4a89d34fff4f.zip
CMake-1bf59ded665ebd20b2633a43abab4a89d34fff4f.tar.gz
CMake-1bf59ded665ebd20b2633a43abab4a89d34fff4f.tar.bz2
ENH: find python framework and include files on OSX
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPythonLibs.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index e11fa7b..5ab35a8 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -71,3 +71,15 @@ IF (WIN32)
PYTHON_INCLUDE_PATH
)
ENDIF(WIN32)
+
+# Python Should be built and installed as a Framework on OSX
+IF (APPLE)
+ IF (EXISTS ~/Library/Frameworks/Python.framework)
+ SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
+ SET (PYTHON_INCLUDE_PATH "~/Library/Frameworks/Python.framework/Headers" CACHE INTERNAL "Hack into the framework")
+ ENDIF (EXISTS ~/Library/Frameworks/Python.framework)
+ IF (EXISTS /Library/Frameworks/Python.framework)
+ SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
+ SET (PYTHON_INCLUDE_PATH "/Library/Frameworks/Python.framework/Headers" CACHE INTERNAL "Hack into the framework")
+ ENDIF (EXISTS /Library/Frameworks/Python.framework)
+ENDIF (APPLE) \ No newline at end of file