aboutsummaryrefslogtreecommitdiff
path: root/externals/cmake-modules
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-04 19:52:54 -0500
committerbunnei <bunneidev@gmail.com>2018-01-04 19:52:54 -0500
commit636d656b459fe7de18ef8d064d9e510b6fe4ebf2 (patch)
treedca84ec7ac5b1dbdca91f91b6096c7fd761114d1 /externals/cmake-modules
parentdc6b80d99748354422db78e8bd35ff604d2e859f (diff)
cmake: Add script to find Unicorn.
Diffstat (limited to 'externals/cmake-modules')
-rw-r--r--externals/cmake-modules/FindUnicorn.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/externals/cmake-modules/FindUnicorn.cmake b/externals/cmake-modules/FindUnicorn.cmake
new file mode 100644
index 0000000000..a0f2a71f69
--- /dev/null
+++ b/externals/cmake-modules/FindUnicorn.cmake
@@ -0,0 +1,18 @@
+# Exports:
+# LIBUNICORN_FOUND
+# LIBUNICORN_INCLUDE_DIR
+# LIBUNICORN_LIBRARY
+
+find_path(LIBUNICORN_INCLUDE_DIR
+ unicorn/unicorn.h
+ HINTS $ENV{UNICORNDIR}
+ PATH_SUFFIXES include)
+
+find_library(LIBUNICORN_LIBRARY
+ NAMES unicorn
+ HINTS $ENV{UNICORNDIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(unicorn DEFAULT_MSG
+ LIBUNICORN_LIBRARY LIBUNICORN_INCLUDE_DIR)
+mark_as_advanced(LIBUNICORN_INCLUDE_DIR LIBUNICORN_LIBRARY)