From da7053b169a562caead1d58bde0606adb4a1af0e Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 4 Jan 2018 19:52:54 -0500 Subject: cmake: Add script to find Unicorn. --- externals/cmake-modules/FindUnicorn.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 externals/cmake-modules/FindUnicorn.cmake (limited to 'externals') diff --git a/externals/cmake-modules/FindUnicorn.cmake b/externals/cmake-modules/FindUnicorn.cmake new file mode 100644 index 000000000..a0f2a71f6 --- /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) -- cgit v1.2.3