summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BundleTest/CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt
index 1e90566..57ebd24 100644
--- a/Tests/BundleTest/CMakeLists.txt
+++ b/Tests/BundleTest/CMakeLists.txt
@@ -54,3 +54,34 @@ SET_TARGET_PROPERTIES(BundleTestLib PROPERTIES
INCLUDE(CPack)
+# test the framework find stuff
+IF(EXISTS /usr/lib/libtcl.dylib
+ AND EXISTS /System/Library/Frameworks/tcl.framework)
+ SET(TCL NOTFOUND)
+ FIND_LIBRARY(TCL tcl)
+ MESSAGE("frame: ${TCL}")
+ IF(NOT "${TCL}" MATCHES .framework)
+ MESSAGE(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
+ ENDIF(NOT "${TCL}" MATCHES .framework)
+ SET(TCL NOTFOUND)
+ SET(CMAKE_FIND_FRAMEWORK LAST)
+ FIND_LIBRARY(TCL tcl)
+ IF("${TCL}" MATCHES .framework)
+ MESSAGE(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
+ ENDIF("${TCL}" MATCHES .framework)
+ SET(TCL NOTFOUND)
+ SET(CMAKE_FIND_FRAMEWORK NEVER)
+ FIND_LIBRARY(TCL tcl)
+ IF("${TCL}" MATCHES .framework)
+ MESSAGE(FATAL_ERROR "Found framework and should have found dylib ${TCL}")
+ ENDIF("${TCL}" MATCHES .framework)
+ MESSAGE("not frame: ${TCL}")
+ SET(TCL NOTFOUND)
+ SET(CMAKE_FIND_FRAMEWORK FIRST)
+ FIND_LIBRARY(TCL tcl)
+ IF(NOT "${TCL}" MATCHES .framework)
+ MESSAGE(FATAL_ERROR "Could not find tcl framework, found ${TCL}")
+ ENDIF(NOT "${TCL}" MATCHES .framework)
+ MESSAGE("frame: ${TCL}")
+ENDIF(EXISTS /usr/lib/libtcl.dylib
+ AND EXISTS /System/Library/Frameworks/tcl.framework)