diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-29 18:33:49 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-03-29 18:33:49 (GMT) |
commit | 4fd3292d04a8d6934d2d821767bf26baf7deaa90 (patch) | |
tree | 7e1b3f452d381529e6b3a0040d9d87983c2d1d82 /Tests/BundleTest/CMakeLists.txt | |
parent | 388c005ccdf620cabe34fabcb6715a86962f5333 (diff) | |
download | CMake-4fd3292d04a8d6934d2d821767bf26baf7deaa90.zip CMake-4fd3292d04a8d6934d2d821767bf26baf7deaa90.tar.gz CMake-4fd3292d04a8d6934d2d821767bf26baf7deaa90.tar.bz2 |
ENH: add a test for find framework stuff in find_library, and fix the framework search stuff
Diffstat (limited to 'Tests/BundleTest/CMakeLists.txt')
-rw-r--r-- | Tests/BundleTest/CMakeLists.txt | 31 |
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) |