[brlcad-commits] SF.net SVN: brlcad:[40247] brlcad/branches/cmake/misc/CMake/FindTCL.cmake
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-08-19 16:40:29
|
Revision: 40247 http://brlcad.svn.sourceforge.net/brlcad/?rev=40247&view=rev Author: starseeker Date: 2010-08-19 16:40:12 +0000 (Thu, 19 Aug 2010) Log Message: ----------- Peg min and max to exact if it's set. 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-19 16:28:32 UTC (rev 40246) +++ brlcad/branches/cmake/misc/CMake/FindTCL.cmake 2010-08-19 16:40:12 UTC (rev 40247) @@ -156,24 +156,28 @@ ENDMACRO(WIN32TCLTKPATHS) # Need some routines to chop version numbers up -MACRO(SPLITTCLVERSIONNUM versionnum) +MACRO(SPLIT_TCL_VERSION_NUM versionnum) STRING(REGEX REPLACE "([0-9]*).[0-9]*.?[0-9]*" "\\1" ${versionnum}_MAJOR "${${versionnum}}") STRING(REGEX REPLACE "[0-9]*.([0-9]*).?[0-9]*" "\\1" ${versionnum}_MINOR "${${versionnum}}") STRING(REGEX REPLACE "[0-9]*.[0-9]*.?([0-9]*)" "\\1" ${versionnum}_PATCH "${${versionnum}}") ENDMACRO() -SET(TCL_MIN_VERSION "8.3.6") -SET(TCL_MAX_VERSION "8.5.8") +# If an exact version is set, peg min and max at it too so the comparisons will work +IF(TCLTK_EXACT_VERSION) + SET(TCLTK_MIN_VERSION ${TCLTK_EXACT_VERSION}) + SET(TCLTK_MAX_VERSION ${TCLTK_EXACT_VERSION}) +ENDIF(TCLTK_EXACT_VERSION) -MACRO(FINDLIBRARYVERSIONS targetname pathnames options) - SPLITTCLVERSIONNUM(TCL_MIN_VERSION) - SPLITTCLVERSIONNUM(TCL_MAX_VERSION) + +MACRO(FIND_LIBRARY_VERSIONS targetname pathnames options) + SPLIT_TCL_VERSION_NUM(TCLTK_MIN_VERSION) + SPLIT_TCL_VERSION_NUM(TCLTK_MAX_VERSION) FOREACH(MAJORNUM ${TCLTK_POSSIBLE_MAJOR_VERSIONS}) - if(NOT MAJORNUM LESS TCL_MIN_VERSION_MAJOR) - if(NOT MAJORNUM GREATER TCL_MAX_VERSION_MAJOR) + if(NOT MAJORNUM LESS TCLTK_MIN_VERSION_MAJOR) + if(NOT MAJORNUM GREATER TCLTK_MAX_VERSION_MAJOR) FOREACH(MINORNUM ${TCLTK_POSSIBLE_MINOR_VERSIONS}) - if(NOT MINORNUM LESS TCL_MIN_VERSION_MINOR) - if(NOT MINORNUM GREATER TCL_MAX_VERSION_MINOR) + if(NOT MINORNUM LESS TCLTK_MIN_VERSION_MINOR) + if(NOT MINORNUM GREATER TCLTK_MAX_VERSION_MINOR) SET(TCLTK_${targetname}${MAJORNUM}${MINORNUM} TCLTK_${targetname}${MAJORNUM}${MINORNUM}-NOTFOUND) FOREACH(SPATH ${pathnames}) FIND_LIBRARY(TCLTK_${targetname}${MAJORNUM}${MINORNUM} NAMES ${targetname}${MAJORNUM}.${MINORNUM} ${targetname}${MAJORNUM}${MINORNUM} PATHS ${SPATH} ${options}) @@ -208,8 +212,8 @@ SET(TCL_PREFIX_INC "${TCL_PREFIX}/include") ENDIF(TCL_PREFIX) -FINDLIBRARYVERSIONS(tcl ${TCL_PREFIX_LIB} NO_SYSTEM_PATH) -FINDLIBRARYVERSIONS(tcl "/usr" "") +FIND_LIBRARY_VERSIONS(tcl ${TCL_PREFIX_LIB} NO_SYSTEM_PATH) +FIND_LIBRARY_VERSIONS(tcl "/usr" "") #LIST(REMOVE_DUPLICATES TCL_FOUND_MAJOR_VERSIONS) #LIST(REMOVE_DUPLICATES TCL_FOUND_MINOR_VERSIONS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |