summaryrefslogtreecommitdiffstats
path: root/cmake/FindLibRustcDemangle.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindLibRustcDemangle.cmake')
-rw-r--r--cmake/FindLibRustcDemangle.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/FindLibRustcDemangle.cmake b/cmake/FindLibRustcDemangle.cmake
new file mode 100644
index 0000000..c247e16
--- /dev/null
+++ b/cmake/FindLibRustcDemangle.cmake
@@ -0,0 +1,22 @@
+if (LIBRUSTC_DEMANGLE_LIBRARIES)
+ set (LibRustcDemangle_FIND_QUIETLY TRUE)
+endif()
+
+find_library(LIBRUSTC_DEMANGLE_LIBRARIES
+ NAMES
+ rustc_demangle
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ ENV LIBRARY_PATH
+ ENV LD_LIBRARY_PATH)
+
+include (FindPackageHandleStandardArgs)
+
+# handle the QUIETLY and REQUIRED arguments and set LIBRUSTC_DEMANGLE_FOUND to TRUE if all listed variables are TRUE
+find_package_handle_standard_args(LibRustcDemangle DEFAULT_MSG
+ LIBRUSTC_DEMANGLE_LIBRARIES)
+
+mark_as_advanced(LIBRUSTC_DEMANGLE_LIBRARIES)