aboutsummaryrefslogtreecommitdiff
path: root/cmake/Finddpp.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Finddpp.cmake')
-rw-r--r--cmake/Finddpp.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/Finddpp.cmake b/cmake/Finddpp.cmake
new file mode 100644
index 0000000..92933b8
--- /dev/null
+++ b/cmake/Finddpp.cmake
@@ -0,0 +1,14 @@
+include(FindPackageHandleStandardArgs)
+
+find_library(DPP_LIBRARY NAMES dpp)
+
+find_package_handle_standard_args(dpp REQUIRED_VARS DPP_LIBRARY)
+
+if (DPP_FOUND)
+ mark_as_advanced(DPP_LIBRARY)
+endif()
+
+if(DPP_FOUND AND NOT TARGET dpp::dpp)
+ add_library(dpp::dpp IMPORTED UNKNOWN)
+ set_property(TARGET dpp::dpp PROPERTY IMPORTED_LOCATION ${DPP_LIBRARY})
+endif() \ No newline at end of file