summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-08-01 16:55:40 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-08-01 16:55:40 +0200
commitf1ec4f11e3ebf476b6508d49ed5e23a847af97b2 (patch)
tree2a996d6389f23166802c02bc38bb4b287efd3c47
parent3eb66cba37fb338e4537798e9c616a0726d829a7 (diff)
downloadlibssh-f1ec4f11e3ebf476b6508d49ed5e23a847af97b2.tar.gz
libssh-f1ec4f11e3ebf476b6508d49ed5e23a847af97b2.tar.xz
libssh-f1ec4f11e3ebf476b6508d49ed5e23a847af97b2.zip
cmake: Add CMOCKA_ROOT_DIR with hints and paths.
-rw-r--r--cmake/Modules/FindCMocka.cmake19
1 files changed, 18 insertions, 1 deletions
diff --git a/cmake/Modules/FindCMocka.cmake b/cmake/Modules/FindCMocka.cmake
index 2dd9fc5f..76b4ba74 100644
--- a/cmake/Modules/FindCMocka.cmake
+++ b/cmake/Modules/FindCMocka.cmake
@@ -21,6 +21,23 @@
#=============================================================================
#
+set(_CMOCKA_ROOT_HINTS
+)
+
+set(_CMOCKA_ROOT_PATHS
+ "$ENV{PROGRAMFILES}/cmocka"
+)
+
+find_path(CMOCKA_ROOT_DIR
+ NAMES
+ include/cmocka.h
+ HINTS
+ ${_CMOCKA_ROOT_HINTS}
+ PATHS
+ ${_CMOCKA_ROOT_PATHS}
+)
+mark_as_advanced(CMOCKA_ROOT_DIR)
+
find_path(CMOCKA_INCLUDE_DIR
NAMES
cmocka.h
@@ -32,7 +49,7 @@ find_library(CMOCKA_LIBRARY
NAMES
cmocka
PATHS
- ${CMOCKA_ROOT_DIR}/include
+ ${CMOCKA_ROOT_DIR}/lib
)
if (CMOCKA_LIBRARY)