summaryrefslogtreecommitdiff
path: root/cmake/FindGypsy.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindGypsy.cmake')
-rw-r--r--cmake/FindGypsy.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/FindGypsy.cmake b/cmake/FindGypsy.cmake
new file mode 100644
index 00000000..3639568e
--- /dev/null
+++ b/cmake/FindGypsy.cmake
@@ -0,0 +1,14 @@
+find_package(PkgConfig QUIET)
+if (PkgConfig_FOUND)
+ pkg_check_modules(Gypsy gypsy IMPORTED_TARGET)
+
+ if (TARGET PkgConfig::Gypsy)
+ mark_as_advanced(Gypsy_LIBRARIES Gypsy_INCLUDE_DIRS)
+ if (NOT TARGET Gypsy::Gypsy)
+ add_library(Gypsy::Gypsy INTERFACE IMPORTED)
+ target_link_libraries(Gypsy::Gypsy INTERFACE PkgConfig::Gypsy)
+ endif()
+ else()
+ set(Gypsy_FOUND 0)
+ endif()
+endif()