|
From: <ai...@us...> - 2014-01-10 07:43:05
|
Revision: 12929
http://sourceforge.net/p/plplot/code/12929
Author: airwin
Date: 2014-01-10 07:43:02 +0000 (Fri, 10 Jan 2014)
Log Message:
-----------
Improve the reliability of determining the Tcl and Tk library version
numbers by only version parsing the library name rather the full path
of the library name. This change solved a bug where the library
version was being parsed from the wine (!) version number that I
happened to be using in my build tree prefix to keep track of various
results for various wine versions.
Add some additional names (with a compact numeric suffix and with no
numerical suffix at all) to search for the itcl and itk libraries.
This change solved a bug where epa_build creates itcl and itk
libraries with compact numerical suffixes on the MinGW/MSYS platform.
Modified Paths:
--------------
trunk/cmake/modules/tcl-related.cmake
Modified: trunk/cmake/modules/tcl-related.cmake
===================================================================
--- trunk/cmake/modules/tcl-related.cmake 2014-01-10 01:45:35 UTC (rev 12928)
+++ trunk/cmake/modules/tcl-related.cmake 2014-01-10 07:43:02 UTC (rev 12929)
@@ -128,7 +128,8 @@
# Sanity checking of Tcl version consistency _if_ a Tcl version string
# can be extracted from the Tcl library name.
- string(REGEX MATCH "[0-9]+[.]?[0-9]+" library_version ${TCL_LIBRARY})
+ get_filename_component(library_name ${TCL_LIBRARY} NAME)
+ string(REGEX MATCH "[0-9]+[.]?[0-9]+" library_version ${library_name})
if(library_version)
# If no decimal point in version insert as the second character.
if(NOT library_version MATCHES "[.]")
@@ -226,8 +227,9 @@
if(ENABLE_itcl)
message(STATUS "Looking for itcl library")
# Search first for epa_build install location.
- find_library(ITCL_LIBRARY itcl${PLPLOT_ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}/itcl${PLPLOT_ITCL_VERSION})
- find_library(ITCL_LIBRARY itcl${PLPLOT_ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH})
+ string(REGEX REPLACE "\\." "" COMPACT_PLPLOT_ITCL_VERSION ${PLPLOT_ITCL_VERSION})
+ find_library(ITCL_LIBRARY NAMES itcl${PLPLOT_ITCL_VERSION} itcl${COMPACT_PLPLOT_ITCL_VERSION} itcl HINTS ${TCL_LIBRARY_PATH}/itcl${PLPLOT_ITCL_VERSION})
+ find_library(ITCL_LIBRARY NAMES itcl${PLPLOT_ITCL_VERSION} itcl${COMPACT_PLPLOT_ITCL_VERSION} itcl HINTS ${TCL_LIBRARY_PATH})
if(ITCL_LIBRARY)
message(STATUS "Looking for itcl library - found")
message(STATUS "ITCL_LIBRARY = ${ITCL_LIBRARY}")
@@ -305,7 +307,8 @@
# Sanity checking of Tk version consistency _if_ a Tk
# version string can be extracted from the Tk library
# name.
- string(REGEX MATCH "[0-9]+[.]?[0-9]+" library_version ${TK_LIBRARY})
+ get_filename_component(library_name ${TK_LIBRARY} NAME)
+ string(REGEX MATCH "[0-9]+[.]?[0-9]+" library_version ${library_name})
if(library_version)
# If no decimal point in version insert as the second character.
if(NOT library_version MATCHES "[.]")
@@ -467,8 +470,9 @@
if(ENABLE_itk)
message(STATUS "Looking for itk library")
# Search first for epa_build install location.
- find_library(ITK_LIBRARY itk${PLPLOT_ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}/itk${PLPLOT_ITK_VERSION})
- find_library(ITK_LIBRARY itk${PLPLOT_ITK_VERSION} HINTS ${TCL_LIBRARY_PATH})
+ string(REGEX REPLACE "\\." "" COMPACT_PLPLOT_ITK_VERSION ${PLPLOT_ITK_VERSION})
+ find_library(ITK_LIBRARY NAMES itk${PLPLOT_ITK_VERSION} itk${COMPACT_PLPLOT_ITK_VERSION} itk HINTS ${TK_LIBRARY_PATH}/itk${PLPLOT_ITK_VERSION})
+ find_library(ITK_LIBRARY NAMES itk${PLPLOT_ITK_VERSION} itk${COMPACT_PLPLOT_ITK_VERSION} itk HINTS ${TK_LIBRARY_PATH})
if(ITK_LIBRARY)
message(STATUS "Looking for itk library - found")
message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|