Changeset - bc2ae264e46a
[Not reviewed]
default
0 1 0
Hasan Yavuz ÖZDERYA - 10 years ago 2015-06-20 05:50:09
hy@ozderya.net
find qwt root under windows
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
cmake/modules/FindQwt.cmake
Show inline comments
 
#
 
# Copyright © 2015 Hasan Yavuz Özderya
 
#
 
# This file is part of serialplot.
 
#
 
# serialplot is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# serialplot is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with serialplot.  If not, see <http://www.gnu.org/licenses/>.
 
#
 

	
 
#
 
# Note: This module will only find local Qwt installations in
 
# /usr/local/qwt-VERSION directories.
 
#
 

	
 
file(GLOB qwt_glob_dir "/usr/local/qwt*/")
 
file(GLOB qwt_glob_dir "/usr/local/qwt*/" "c:/Qwt*")
 

	
 
if(qwt_glob_dir)
 
  foreach(qwt_path ${qwt_glob_dir})
 
	# find the qwt_global.h file
 
	unset(qwt_root CACHE)
 
	find_path(qwt_root
 
	  "include/qwt_global.h"
 
	  HINTS "${qwt_path}")
 
	if(qwt_root)
 
	  list(APPEND qwt_roots ${qwt_root})
 
	endif(qwt_root)
 
  endforeach(qwt_path)
 
endif(qwt_glob_dir)
 

	
 
# select qwt root according to version
 
if(qwt_roots)
 
  foreach(qwt_root ${qwt_roots})
 
	# extract the version information
 
	unset(qwt_version_string)
 
	file(STRINGS "${qwt_root}/include/qwt_global.h" qwt_version_string
 
	  REGEX "#define[ \t]+QWT_VERSION_STR")
 
	if(qwt_version_string)
 
	  string(REGEX REPLACE "[^\"]*\"([0-9.]+)\".*" "\\1"
 
		qwt_version_string ${qwt_version_string})
0 comments (0 inline, 0 general)