aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindPango.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindPango.cmake')
-rw-r--r--cmake/FindPango.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake
index b934c6ff..485240d5 100644
--- a/cmake/FindPango.cmake
+++ b/cmake/FindPango.cmake
@@ -8,14 +8,15 @@ find_pkg_config_with_fallback(Pango
)
if(Pango_FOUND AND NOT Pango_VERSION)
- find_path(Pango_INCLUDE_DIR "pango/pango.h" HINTS ${Pango_INCLUDE_DIRS})
+ find_file(Pango_FEATURES_HEADER "pango/pango-features.h" HINTS ${Pango_INCLUDE_DIRS})
+ mark_as_advanced(Pango_FEATURES_HEADER)
- if(Pango_INCLUDE_DIR)
- file(STRINGS "${Pango_INCLUDE_DIR}/pango/pango-features.h" Pango_MAJOR_VERSION REGEX "^#define PANGO_VERSION_MAJOR +\\(?([0-9]+)\\)?$")
+ if(Pango_FEATURES_HEADER)
+ file(STRINGS "${Pango_FEATURES_HEADER}" Pango_MAJOR_VERSION REGEX "^#define PANGO_VERSION_MAJOR +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define PANGO_VERSION_MAJOR \\(?([0-9]+)\\)?$" "\\1" Pango_MAJOR_VERSION "${Pango_MAJOR_VERSION}")
- file(STRINGS "${Pango_INCLUDE_DIR}/pango/pango-features.h" Pango_MINOR_VERSION REGEX "^#define PANGO_VERSION_MINOR +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${Pango_FEATURES_HEADER}" Pango_MINOR_VERSION REGEX "^#define PANGO_VERSION_MINOR +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define PANGO_VERSION_MINOR \\(?([0-9]+)\\)?$" "\\1" Pango_MINOR_VERSION "${Pango_MINOR_VERSION}")
- file(STRINGS "${Pango_INCLUDE_DIR}/pango/pango-features.h" Pango_MICRO_VERSION REGEX "^#define PANGO_VERSION_MICRO +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${Pango_FEATURES_HEADER}" Pango_MICRO_VERSION REGEX "^#define PANGO_VERSION_MICRO +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define PANGO_VERSION_MICRO \\(?([0-9]+)\\)?$" "\\1" Pango_MICRO_VERSION "${Pango_MICRO_VERSION}")
set(Pango_VERSION "${Pango_MAJOR_VERSION}.${Pango_MINOR_VERSION}.${Pango_MICRO_VERSION}")
unset(Pango_MAJOR_VERSION)