summaryrefslogtreecommitdiffstats
path: root/Modules/FindTCL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-20 14:42:19 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-20 14:42:19 (GMT)
commit1d0569e79d4f33b2f73c217f0c26f024efad4213 (patch)
tree8cebff675e85f9ede1aefd2a1ee0cbea70e1de5c /Modules/FindTCL.cmake
parentbf70e0c2465722e861f94f695aa8e9565a7d7080 (diff)
downloadCMake-1d0569e79d4f33b2f73c217f0c26f024efad4213.zip
CMake-1d0569e79d4f33b2f73c217f0c26f024efad4213.tar.gz
CMake-1d0569e79d4f33b2f73c217f0c26f024efad4213.tar.bz2
ENH: Use the Mac -framework for Tcl if it is available.
Diffstat (limited to 'Modules/FindTCL.cmake')
-rw-r--r--Modules/FindTCL.cmake34
1 files changed, 34 insertions, 0 deletions
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index e6c747e..3021b62 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -79,6 +79,12 @@ FIND_LIBRARY(TK_STUB_LIBRARY_DEBUG
)
SET (TCLTK_POSSIBLE_INCLUDE_PATHS
+ ~/Library/Frameworks/Tcl.framework/Headers
+ ~/Library/Frameworks/Tk.framework/Headers
+ ~/Library/Frameworks/Tk.framework/PrivateHeaders
+ /Library/Frameworks/Tcl.framework/Headers
+ /Library/Frameworks/Tk.framework/Headers
+ /Library/Frameworks/Tk.framework/PrivateHeaders
"${TCL_TCLSH_PATH}/../include"
"${TK_WISH_PATH}/../include"
/usr/include
@@ -121,6 +127,34 @@ IF (WIN32)
)
ENDIF(WIN32)
+IF(APPLE)
+ IF(EXISTS ~/Library/Frameworks/Tcl.framework)
+ SET(TCL_HAVE_FRAMEWORK 1)
+ ENDIF(EXISTS ~/Library/Frameworks/Tcl.framework)
+ IF(EXISTS /Library/Frameworks/Tcl.framework)
+ SET(TCL_HAVE_FRAMEWORK 1)
+ ENDIF(EXISTS /Library/Frameworks/Tcl.framework)
+ IF(EXISTS ~/Library/Frameworks/Tk.framework)
+ SET(TCL_TK_HAVE_FRAMEWORK 1)
+ ENDIF(EXISTS ~/Library/Frameworks/Tk.framework)
+ IF(EXISTS /Library/Frameworks/Tk.framework)
+ SET(TCL_TK_HAVE_FRAMEWORK 1)
+ ENDIF(EXISTS /Library/Frameworks/Tk.framework)
+ IF("${TCL_INCLUDE_PATH}" MATCHES "Tcl\\.framework")
+ SET(TCL_LIBRARY "")
+ ENDIF("${TCL_INCLUDE_PATH}" MATCHES "Tcl\\.framework")
+ IF(TCL_HAVE_FRAMEWORK)
+ IF(NOT TCL_LIBRARY)
+ SET (TCL_LIBRARY "-framework Tcl" CACHE FILEPATH "Tcl Framework" FORCE)
+ ENDIF(NOT TCL_LIBRARY)
+ ENDIF(TCL_HAVE_FRAMEWORK)
+ IF(TCL_TK_HAVE_FRAMEWORK)
+ IF(NOT TK_LIBRARY)
+ SET (TK_LIBRARY "-framework Tk" CACHE FILEPATH "Tk Framework" FORCE)
+ ENDIF(NOT TK_LIBRARY)
+ ENDIF(TCL_TK_HAVE_FRAMEWORK)
+ENDIF(APPLE)
+
MARK_AS_ADVANCED(
TCL_STUB_LIBRARY
TCL_STUB_LIBRARY_DEBUG