diff options
author | Marvin W <git@larma.de> | 2017-04-23 10:01:40 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-04-26 21:48:53 +0200 |
commit | eddf17c68274c3e8ecf86a13858243159ffe9714 (patch) | |
tree | db92b3ea3ffd453a16df9e53d0b454d172b8c8f2 /cmake/FindGTK3.cmake | |
parent | 3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc (diff) | |
download | dino-eddf17c68274c3e8ecf86a13858243159ffe9714.tar.gz dino-eddf17c68274c3e8ecf86a13858243159ffe9714.zip |
cmake/signal-protocol: shared lib, mark_as_advanced and others
Diffstat (limited to 'cmake/FindGTK3.cmake')
-rw-r--r-- | cmake/FindGTK3.cmake | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake index f70c23c2..d80c1730 100644 --- a/cmake/FindGTK3.cmake +++ b/cmake/FindGTK3.cmake @@ -8,14 +8,15 @@ find_pkg_config_with_fallback(GTK3 ) if(GTK3_FOUND AND NOT GTK3_VERSION) - find_path(GTK3_INCLUDE_DIR "gtk/gtk.h" HINTS ${GTK3_INCLUDE_DIRS}) + find_file(GTK3_VERSION_HEADER "gtk/gtkversion.h" HINTS ${GTK3_INCLUDE_DIRS}) + mark_as_advanced(GTK3_VERSION_HEADER) - if(GTK3_INCLUDE_DIR) - file(STRINGS "${GTK3_INCLUDE_DIR}/gtk/gtkversion.h" GTK3_MAJOR_VERSION REGEX "^#define GTK_MAJOR_VERSION +\\(?([0-9]+)\\)?$") + if(GTK3_VERSION_HEADER) + file(STRINGS "${GTK3_VERSION_HEADER}" GTK3_MAJOR_VERSION REGEX "^#define GTK_MAJOR_VERSION +\\(?([0-9]+)\\)?$") string(REGEX REPLACE "^#define GTK_MAJOR_VERSION \\(?([0-9]+)\\)?$" "\\1" GTK3_MAJOR_VERSION "${GTK3_MAJOR_VERSION}") - file(STRINGS "${GTK3_INCLUDE_DIR}/gtk/gtkversion.h" GTK3_MINOR_VERSION REGEX "^#define GTK_MINOR_VERSION +\\(?([0-9]+)\\)?$") + file(STRINGS "${GTK3_VERSION_HEADER}" GTK3_MINOR_VERSION REGEX "^#define GTK_MINOR_VERSION +\\(?([0-9]+)\\)?$") string(REGEX REPLACE "^#define GTK_MINOR_VERSION \\(?([0-9]+)\\)?$" "\\1" GTK3_MINOR_VERSION "${GTK3_MINOR_VERSION}") - file(STRINGS "${GTK3_INCLUDE_DIR}/gtk/gtkversion.h" GTK3_MICRO_VERSION REGEX "^#define GTK_MICRO_VERSION +\\(?([0-9]+)\\)?$") + file(STRINGS "${GTK3_VERSION_HEADER}" GTK3_MICRO_VERSION REGEX "^#define GTK_MICRO_VERSION +\\(?([0-9]+)\\)?$") string(REGEX REPLACE "^#define GTK_MICRO_VERSION \\(?([0-9]+)\\)?$" "\\1" GTK3_MICRO_VERSION "${GTK3_MICRO_VERSION}") set(GTK3_VERSION "${GTK3_MAJOR_VERSION}.${GTK3_MINOR_VERSION}.${GTK3_MICRO_VERSION}") unset(GTK3_MAJOR_VERSION) @@ -26,7 +27,5 @@ endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GTK3 - FOUND_VAR GTK3_FOUND REQUIRED_VARS GTK3_LIBRARY - VERSION_VAR GTK3_VERSION -)
\ No newline at end of file + VERSION_VAR GTK3_VERSION) |