summaryrefslogtreecommitdiff
path: root/cmake/modules
diff options
context:
space:
mode:
authorDuncan Mac-Vicar P <dmacvicar@suse.de>2008-10-17 08:56:03 +0000
committerDuncan Mac-Vicar P <dmacvicar@suse.de>2008-10-17 08:56:03 +0000
commit0cc20c1a721a936dfb0e0eee4bb53acb76f9cb3a (patch)
tree99205e4c4326e015b4e912937ad5672d7749b71c /cmake/modules
parentf3dc1530bd38764db4c0fc39993bb46feefe7a29 (diff)
downloadlibsolv-0cc20c1a721a936dfb0e0eee4bb53acb76f9cb3a.tar.gz
libsolv-0cc20c1a721a936dfb0e0eee4bb53acb76f9cb3a.tar.bz2
libsolv-0cc20c1a721a936dfb0e0eee4bb53acb76f9cb3a.zip
I should look really if something is packaged before importing it
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindCheck.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/modules/FindCheck.cmake b/cmake/modules/FindCheck.cmake
new file mode 100644
index 0000000..62290f9
--- /dev/null
+++ b/cmake/modules/FindCheck.cmake
@@ -0,0 +1,31 @@
+
+FIND_PATH(CHECK_INCLUDE_DIR NAMES check.h)
+MARK_AS_ADVANCED(CHECK_INCLUDE_DIR)
+
+# Look for the library.
+FIND_LIBRARY(CHECK_LIBRARY NAMES check)
+MARK_AS_ADVANCED(CHECK_LIBRARY)
+
+# Copy the results to the output variables.
+IF(CHECK_INCLUDE_DIR AND CHECK_LIBRARY)
+ SET(CHECK_FOUND 1)
+ SET(CHECK_LIBRARIES ${CHECK_LIBRARY})
+ SET(CHECK_INCLUDE_DIRS ${CHECK_INCLUDE_DIR})
+ELSE(CHECK_INCLUDE_DIR AND CHECK_LIBRARY)
+ SET(CHECK_FOUND 0)
+ SET(CHECK_LIBRARIES)
+ SET(CHECK_INCLUDE_DIRS)
+ENDIF(CHECK_INCLUDE_DIR AND CHECK_LIBRARY)
+
+# Report the results.
+IF(NOT CHECK_FOUND)
+ SET(CHECK_DIR_MESSAGE
+ "CHECK was not found. Make sure CHECK_LIBRARY and CHECK_INCLUDE_DIR are set.")
+ IF(NOT CHECK_FIND_QUIETLY)
+ MESSAGE(STATUS "${CHECK_DIR_MESSAGE}")
+ ELSE(NOT CHECK_FIND_QUIETLY)
+ IF(CHECK_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "${CHECK_DIR_MESSAGE}")
+ ENDIF(CHECK_FIND_REQUIRED)
+ ENDIF(NOT CHECK_FIND_QUIETLY)
+ENDIF(NOT CHECK_FOUND)