summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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