aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindATK.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/FindATK.cmake
parent3eb9aa0fa79ea9fcebb5f702f81c2e54aafdc8cc (diff)
downloaddino-eddf17c68274c3e8ecf86a13858243159ffe9714.tar.gz
dino-eddf17c68274c3e8ecf86a13858243159ffe9714.zip
cmake/signal-protocol: shared lib, mark_as_advanced and others
Diffstat (limited to 'cmake/FindATK.cmake')
-rw-r--r--cmake/FindATK.cmake15
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/FindATK.cmake b/cmake/FindATK.cmake
index bdd25897..c14a32b1 100644
--- a/cmake/FindATK.cmake
+++ b/cmake/FindATK.cmake
@@ -8,14 +8,15 @@ find_pkg_config_with_fallback(ATK
)
if(ATK_FOUND AND NOT ATK_VERSION)
- find_path(ATK_INCLUDE_DIR "atk/atk.h" HINTS ${ATK_INCLUDE_DIRS})
+ find_file(ATK_VERSION_HEADER "atk/atkversion.h" HINTS ${ATK_INCLUDE_DIRS})
+ mark_as_advanced(ATK_VERSION_HEADER)
- if(ATK_INCLUDE_DIR)
- file(STRINGS "${ATK_INCLUDE_DIR}/atk/atkversion.h" ATK_MAJOR_VERSION REGEX "^#define ATK_MAJOR_VERSION +\\(?([0-9]+)\\)?$")
+ if(ATK_VERSION_HEADER)
+ file(STRINGS "${ATK_VERSION_HEADER}" ATK_MAJOR_VERSION REGEX "^#define ATK_MAJOR_VERSION +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define ATK_MAJOR_VERSION \\(?([0-9]+)\\)?$" "\\1" ATK_MAJOR_VERSION "${ATK_MAJOR_VERSION}")
- file(STRINGS "${ATK_INCLUDE_DIR}/atk/atkversion.h" ATK_MINOR_VERSION REGEX "^#define ATK_MINOR_VERSION +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${ATK_VERSION_HEADER}" ATK_MINOR_VERSION REGEX "^#define ATK_MINOR_VERSION +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define ATK_MINOR_VERSION \\(?([0-9]+)\\)?$" "\\1" ATK_MINOR_VERSION "${ATK_MINOR_VERSION}")
- file(STRINGS "${ATK_INCLUDE_DIR}/atk/atkversion.h" ATK_MICRO_VERSION REGEX "^#define ATK_MICRO_VERSION +\\(?([0-9]+)\\)?$")
+ file(STRINGS "${ATK_VERSION_HEADER}" ATK_MICRO_VERSION REGEX "^#define ATK_MICRO_VERSION +\\(?([0-9]+)\\)?$")
string(REGEX REPLACE "^#define ATK_MICRO_VERSION \\(?([0-9]+)\\)?$" "\\1" ATK_MICRO_VERSION "${ATK_MICRO_VERSION}")
set(ATK_VERSION "${ATK_MAJOR_VERSION}.${ATK_MINOR_VERSION}.${ATK_MICRO_VERSION}")
unset(ATK_MAJOR_VERSION)
@@ -26,7 +27,5 @@ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ATK
- FOUND_VAR ATK_FOUND
REQUIRED_VARS ATK_LIBRARY
- VERSION_VAR ATK_VERSION
-) \ No newline at end of file
+ VERSION_VAR ATK_VERSION) \ No newline at end of file