ENH: fix a bug in the find path stuff so that it can find headers deep in frameworks

This commit is contained in:
Bill Hoffman 2006-03-09 11:35:38 -05:00
parent 6503a0eecc
commit cb95c0a5bc
2 changed files with 15 additions and 35 deletions

View File

@ -150,26 +150,6 @@ IF (WIN32)
) )
ENDIF(WIN32) ENDIF(WIN32)
IF(Tcl_FRAMEWORKS)
# If we are using the Tcl framework, link to it.
IF("${TCL_INCLUDE_PATH}" MATCHES "Tcl\\.framework")
SET(TCL_LIBRARY "")
ENDIF("${TCL_INCLUDE_PATH}" MATCHES "Tcl\\.framework")
IF(NOT TCL_LIBRARY)
SET (TCL_LIBRARY "-framework Tcl" CACHE FILEPATH "Tcl Framework" FORCE)
ENDIF(NOT TCL_LIBRARY)
ENDIF(Tcl_FRAMEWORKS)
IF(Tk_FRAMEWORKS)
# If we are using the Tk framework, link to it.
IF("${TK_INCLUDE_PATH}" MATCHES "Tk\\.framework")
SET(TK_LIBRARY "")
ENDIF("${TK_INCLUDE_PATH}" MATCHES "Tk\\.framework")
IF(NOT TK_LIBRARY)
SET (TK_LIBRARY "-framework Tk" CACHE FILEPATH "Tk Framework" FORCE)
ENDIF(NOT TK_LIBRARY)
ENDIF(Tk_FRAMEWORKS)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
TCL_STUB_LIBRARY TCL_STUB_LIBRARY
TCL_STUB_LIBRARY_DEBUG TCL_STUB_LIBRARY_DEBUG

View File

@ -164,6 +164,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string& file,
return fpath; return fpath;
} }
} }
}
// if it is not found yet or not a framework header, then do a glob search // if it is not found yet or not a framework header, then do a glob search
// for all files in dir/*/Headers/ // for all files in dir/*/Headers/
cmStdString glob = dir; cmStdString glob = dir;
@ -182,7 +183,6 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string& file,
fheader = cmSystemTools::GetFilenamePath(fheader); fheader = cmSystemTools::GetFilenamePath(fheader);
return fheader; return fheader;
} }
}
return ""; return "";
} }