[brlcad-commits] SF.net SVN: brlcad:[40322] brlcad/branches/cmake/misc/CMake/FindTCL.cmake
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-08-25 16:31:48
|
Revision: 40322 http://brlcad.svn.sourceforge.net/brlcad/?rev=40322&view=rev Author: starseeker Date: 2010-08-25 16:31:41 +0000 (Wed, 25 Aug 2010) Log Message: ----------- More fixes to the non-config file logic Modified Paths: -------------- brlcad/branches/cmake/misc/CMake/FindTCL.cmake Modified: brlcad/branches/cmake/misc/CMake/FindTCL.cmake =================================================================== --- brlcad/branches/cmake/misc/CMake/FindTCL.cmake 2010-08-25 16:01:19 UTC (rev 40321) +++ brlcad/branches/cmake/misc/CMake/FindTCL.cmake 2010-08-25 16:31:41 UTC (rev 40322) @@ -528,83 +528,91 @@ # Back to trying to guess values, using the TCLPATHLIST and TKPATHLIST arrays of paths. Since we # no longer are assuming config files, we can't assume headers either - now we need to check the # TCL_NEED_HEADERS option and conditionalize on it. +SET(TCL_LIBRARY "NOTFOUND") IF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + RESET_TCL_VARS() IF(TCL_REQUIRE_TK) - SET(TK_LIBRARY "NOTFOUND") + RESET_TK_VARS() ENDIF(TCL_REQUIRE_TK) SET(TCL_FOUND_VERSION "NOTFOUND") FOREACH(MAJORNUM ${TCL_POSSIBLE_MAJOR_VERSIONS}) FOREACH(MINORNUM ${TCL_POSSIBLE_MINOR_VERSIONS}) FOREACH(SPATH ${TCLPATHLIST}) - SET(CURRENT_SEARCH_VERSION "${MAJORNUM}.${MINORNUM}") - VALIDATE_VERSION(dosearch ${CURRENT_SEARCH_VERSION}) - IF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) - IF(dosearch) - FIND_PROGRAM(TCL_TCLSH NAMES tclsh${MAJORNUM}.${MINORNUM} tclsh${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/bin NO_SYSTEM_PATH) - FIND_LIBRARY(TCL_LIBRARY NAMES tcl${MAJORNUM}.${MINORNUM} tcl${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/lib ${SPATH}/lib64 ${SPATH}/lib${MAJORNUM}.${MINORNUM} ${SPATH}${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) - FIND_PATH(TCL_INCLUDE_PATH NAMES tcl.h PATHS ${SPATH}/include ${SPATH}/include/tcl${MAJORNUM}.${MINORNUM} ${SPATH}/include/tcl${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) - ENDIF(dosearch) - ENDIF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) - IF(TCL_NEED_HEADERS) - IF(NOT TCL_INCLUDE_PATH) - SET(TCL_LIBRARY "NOTFOUND") - ENDIF(NOT TCL_INCLUDE_PATH) - ENDIF(TCL_NEED_HEADERS) - IF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) - SET(TCL_INCLUDE_PATH "NOTFOUND") - SET(TCL_TCLSH "NOTFOUND") - SET(TCL_LIBRARY "NOTFOUND") - ELSE(NOT TCL_LIBRARY OR NOT TCL_TCLSH) - IF(NOT TCL_FOUND_VERSION) - SET(TCL_FOUND_VERSION "${MAJORNUM}.${MINORNUM}") - ENDIF(NOT TCL_FOUND_VERSION) - ENDIF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) - IF(TCL_CURRENTPATH) - LIST(APPEND PATH_RESULTS ${SPATH}) - LIST(REMOVE_ITEM ${pathnames} ${SPATH}) - ENDIF(TCL_CURRENTPATH) + IF(NOT TCL_FOUND_VERSION) + SET(CURRENT_SEARCH_VERSION "${MAJORNUM}.${MINORNUM}") + VALIDATE_VERSION(dosearch ${CURRENT_SEARCH_VERSION}) + IF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + IF(dosearch) + FIND_PROGRAM(TCL_TCLSH NAMES tclsh${MAJORNUM}.${MINORNUM} tclsh${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/bin NO_SYSTEM_PATH) + FIND_LIBRARY(TCL_LIBRARY NAMES tcl${MAJORNUM}.${MINORNUM} tcl${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/lib ${SPATH}/lib64 ${SPATH}/lib${MAJORNUM}.${MINORNUM} ${SPATH}${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) + FIND_PATH(TCL_INCLUDE_PATH NAMES tcl.h PATHS ${SPATH}/include ${SPATH}/include/tcl${MAJORNUM}.${MINORNUM} ${SPATH}/include/tcl${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) + ENDIF(dosearch) + MESSAGE("TCL_TCLSH: ${TCL_TCLSH} TCL_LIBRARY: ${TCL_LIBRARY} TCL_INCLUDE_PATH: ${TCL_INCLUDE_PATH}") + ENDIF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + IF(TCL_NEED_HEADERS) + IF(NOT TCL_INCLUDE_PATH) + RESET_TCL_VARS() + ENDIF(NOT TCL_INCLUDE_PATH) + ENDIF(TCL_NEED_HEADERS) + IF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + RESET_TCL_VARS() + ELSE(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + IF(NOT TCL_FOUND_VERSION) + SET(TCL_FOUND_VERSION "${MAJORNUM}.${MINORNUM}") + ENDIF(NOT TCL_FOUND_VERSION) + ENDIF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) + IF(TCL_CURRENTPATH) + LIST(APPEND PATH_RESULTS ${SPATH}) + LIST(REMOVE_ITEM ${pathnames} ${SPATH}) + ENDIF(TCL_CURRENTPATH) + IF(TCL_FOUND_VERSION) + IF(TCL_REQUIRE_TK) + SET(TK_FOUND_VERSION "NOTFOUND") + FOREACH(MAJORNUM ${TCL_POSSIBLE_MAJOR_VERSIONS}) + FOREACH(MINORNUM ${TCL_POSSIBLE_MINOR_VERSIONS}) + FOREACH(SPATH ${TKPATHLIST}) + IF(NOT TK_LIBRARY OR NOT TK_WISH) + SET(CURRENT_SEARCH_VERSION "${MAJORNUM}.${MINORNUM}") + SET(vtcltkcompare 0) + COMPARE_VERSIONS(${TCL_FOUND_VERSION} ${CURRENT_SEARCH_VERSION} vtcltkcompare) + IF(${vtcltkcompare}) + RESET_TK_VARS() + ELSE(${vtcltkcompare}) + FIND_PROGRAM(TK_WISH NAMES wish${MAJORNUM}.${MINORNUM} wish${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/bin NO_SYSTEM_PATH) + FIND_LIBRARY(TK_LIBRARY NAMES tk${MAJORNUM}.${MINORNUM} tk${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/lib ${SPATH}/lib64 ${SPATH}/lib${MAJORNUM}.${MINORNUM} ${SPATH}${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) + FIND_PATH(TK_INCLUDE_PATH NAMES tk.h PATHS ${SPATH}/include ${SPATH}/include/tk${MAJORNUM}.${MINORNUM} ${SPATH}/include/tk${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) + IF(TCL_NEED_HEADERS) + IF(NOT TK_INCLUDE_PATH) + SET(TK_LIBRARY "NOTFOUND") + ENDIF(NOT TK_INCLUDE_PATH) + ENDIF(TCL_NEED_HEADERS) + IF(NOT TK_LIBRARY OR NOT TK_WISH) + SET(TK_INCLUDE_PATH "NOTFOUND") + SET(TK_WISH "NOTFOUND") + SET(TK_LIBRARY "NOTFOUND") + ELSE(NOT TK_LIBRARY OR NOT TK_WISH) + IF(NOT TK_FOUND_VERSION) + SET(TK_FOUND_VERSION "${MAJORNUM}.${MINORNUM}") + ENDIF(NOT TK_FOUND_VERSION) + ENDIF(NOT TK_LIBRARY OR NOT TK_WISH) + IF(TK_CURRENTPATH) + LIST(APPEND PATH_RESULTS ${SPATH}) + LIST(REMOVE_ITEM ${pathnames} ${SPATH}) + ENDIF(TK_CURRENTPATH) + ENDIF(${vtcltkcompare}) + ENDIF(NOT TK_LIBRARY OR NOT TK_WISH) + ENDFOREACH(SPATH ${${pathnames}}) + ENDFOREACH() + ENDFOREACH() + IF(NOT TK_LIBRARY) + SET(TCL_FOUND_VERSION "NOTFOUND") + ENDIF(NOT TK_LIBRARY) + ENDIF(TCL_REQUIRE_TK) + ENDIF(TCL_FOUND_VERSION) + ENDIF(NOT TCL_FOUND_VERSION) ENDFOREACH(SPATH ${${pathnames}}) - ENDFOREACH() + ENDFOREACH() ENDFOREACH() - - IF(TCL_REQUIRE_TK) - IF(NOT TK_LIBRARY OR NOT TK_WISH) - SET(TK_FOUND_VERSION "NOTFOUND") - FOREACH(MAJORNUM ${TK_POSSIBLE_MAJOR_VERSIONS}) - FOREACH(MINORNUM ${TK_POSSIBLE_MINOR_VERSIONS}) - FOREACH(SPATH ${TKPATHLIST}) - SET(CURRENT_SEARCH_VERSION "${MAJORNUM}.${MINORNUM}") - VALIDATE_VERSION(dosearch ${CURRENT_SEARCH_VERSION}) - IF(NOT TK_LIBRARY OR NOT TK_WISH) - IF(dosearch) - FIND_PROGRAM(TK_WISH NAMES wish${MAJORNUM}.${MINORNUM} wish${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/bin NO_SYSTEM_PATH) - FIND_LIBRARY(TK_LIBRARY NAMES tk${MAJORNUM}.${MINORNUM} tk${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${SPATH}/lib ${SPATH}/lib64 ${SPATH}/lib${MAJORNUM}.${MINORNUM} ${SPATH}${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) - FIND_PATH(TK_INCLUDE_PATH NAMES tk.h PATHS ${SPATH}/include ${SPATH}/include/tk${MAJORNUM}.${MINORNUM} ${SPATH}/include/tk${MAJORNUM}${MINORNUM} NO_SYSTEM_PATH) - ENDIF(dosearch) - ENDIF(NOT TK_LIBRARY OR NOT TK_WISH) - IF(TCL_NEED_HEADERS) - IF(NOT TK_INCLUDE_PATH) - SET(TK_LIBRARY "NOTFOUND") - ENDIF(NOT TK_INCLUDE_PATH) - ENDIF(TCL_NEED_HEADERS) - IF(NOT TK_LIBRARY OR NOT TK_WISH) - SET(TK_INCLUDE_PATH "NOTFOUND") - SET(TK_WISH "NOTFOUND") - SET(TK_LIBRARY "NOTFOUND") - ELSE(NOT TK_LIBRARY OR NOT TK_WISH) - IF(NOT TK_FOUND_VERSION) - SET(TK_FOUND_VERSION "${MAJORNUM}.${MINORNUM}") - ENDIF(NOT TK_FOUND_VERSION) - ENDIF(NOT TK_LIBRARY OR NOT TK_WISH) - IF(TK_CURRENTPATH) - LIST(APPEND PATH_RESULTS ${SPATH}) - LIST(REMOVE_ITEM ${pathnames} ${SPATH}) - ENDIF(TK_CURRENTPATH) - ENDFOREACH(SPATH ${${pathnames}}) - ENDFOREACH() - ENDFOREACH() - ENDIF(NOT TK_LIBRARY OR NOT TK_WISH) - ENDIF(TCL_REQUIRE_TK) ENDIF(NOT TCL_LIBRARY OR NOT TCL_TCLSH) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |