diff options
Diffstat (limited to 'Modules/FindGTK2.cmake')
-rw-r--r-- | Modules/FindGTK2.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index d10b419..1e54cd7 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -114,7 +114,7 @@ # _gtkversion_hdr = Header file to parse #============================================================= function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr) - file(READ ${_gtkversion_hdr} _contents) + file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+") if(_contents) string(REGEX REPLACE ".*#define GTK_MAJOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_major} "${_contents}") string(REGEX REPLACE ".*#define GTK_MINOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_minor} "${_contents}") |