aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindLibnotify.cmake
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-04-23 10:01:40 +0200
committerMarvin W <git@larma.de>2017-04-26 21:48:53 +0200
commiteddf17c68274c3e8ecf86a13858243159ffe9714 (patch)
treedb92b3ea3ffd453a16df9e53d0b454d172b8c8f2 /cmake/FindLibnotify.cmake
parent3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc (diff)
downloaddino-eddf17c68274c3e8ecf86a13858243159ffe9714.tar.gz
dino-eddf17c68274c3e8ecf86a13858243159ffe9714.zip
cmake/signal-protocol: shared lib, mark_as_advanced and others
Diffstat (limited to 'cmake/FindLibnotify.cmake')
-rw-r--r--cmake/FindLibnotify.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/FindLibnotify.cmake b/cmake/FindLibnotify.cmake
index 468ef0c9..61eae949 100644
--- a/cmake/FindLibnotify.cmake
+++ b/cmake/FindLibnotify.cmake
@@ -7,14 +7,15 @@ find_pkg_config_with_fallback(Libnotify
)
if(Libnotify_FOUND AND NOT Libnotify_VERSION)
- find_path(Libnotify_INCLUDE_DIR "libnotify/notify-features.h" HINTS ${Libnotify_INCLUDE_DIRS})
+ find_file(Libnotify_FEATURES_HEADER "libnotify/notify-features.h" HINTS ${Libnotify_INCLUDE_DIRS})
+ mark_as_advanced(Libnotify_FEATURES_HEADER)
- if(Libnotify_INCLUDE_DIR)
- file(STRINGS "${Libnotify_INCLUDE_DIR}/libnotify/notify-features.h" Libnotify_MAJOR_VERSION REGEX "^#define NOTIFY_VERSION_MAJOR +\\(?([0-9]+)\\)?$")
+ if(Libnotify_FEATURES_HEADER)
+ file(STRINGS "${Libnotify_FEATURES_HEADER}" Libnotify_MAJOR_VERSION REGEX "^#define NOTIFY_VERSION_MAJOR +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define NOTIFY_VERSION_MAJOR +\\(?([0-9]+)\\)?$" "\\1" Libnotify_MAJOR_VERSION "${Libnotify_MAJOR_VERSION}")
- file(STRINGS "${Libnotify_INCLUDE_DIR}/libnotify/notify-features.h" Libnotify_MINOR_VERSION REGEX "^#define NOTIFY_VERSION_MINOR +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${Libnotify_FEATURES_HEADER}" Libnotify_MINOR_VERSION REGEX "^#define NOTIFY_VERSION_MINOR +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define NOTIFY_VERSION_MINOR +\\(?([0-9]+)\\)?$" "\\1" Libnotify_MINOR_VERSION "${Libnotify_MINOR_VERSION}")
- file(STRINGS "${Libnotify_INCLUDE_DIR}/libnotify/notify-features.h" Libnotify_MICRO_VERSION REGEX "^#define NOTIFY_VERSION_MICRO +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${Libnotify_FEATURES_HEADER}" Libnotify_MICRO_VERSION REGEX "^#define NOTIFY_VERSION_MICRO +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define NOTIFY_VERSION_MICRO +\\(?([0-9]+)\\)?$" "\\1" Libnotify_MICRO_VERSION "${Libnotify_MICRO_VERSION}")
set(Libnotify_VERSION "${Libnotify_MAJOR_VERSION}.${Libnotify_MINOR_VERSION}.${Libnotify_MICRO_VERSION}")
unset(Libnotify_MAJOR_VERSION)