summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2016-04-26 12:37:21 +0200
committerAllen Winter <allen.winter@kdab.com>2016-04-26 15:49:47 -0400
commitabd0019f5a60f4fb787b68daa7fa99c845a4e3de (patch)
tree733af26c6a3c37181c334a1016ed38c6a5ea0038 /cmake
parentb1081cccb90fbe4cd859d3280a0470c30dce5cac (diff)
downloadlibical-git-abd0019f5a60f4fb787b68daa7fa99c845a4e3de.tar.gz
Provide libical-glib, a GObject-based interface for libical with introspection
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindGLib.cmake25
-rw-r--r--cmake/modules/FindLibXML.cmake25
-rw-r--r--cmake/modules/GObjectIntrospectionMacros.cmake4
3 files changed, 52 insertions, 2 deletions
diff --git a/cmake/modules/FindGLib.cmake b/cmake/modules/FindGLib.cmake
new file mode 100644
index 00000000..8c0222bd
--- /dev/null
+++ b/cmake/modules/FindGLib.cmake
@@ -0,0 +1,25 @@
+# - try to find glib
+#
+# Once done this will define
+#
+# GLIB_FOUND - system has GLib 2.0
+# GLIB_CFLAGS
+# GLIB_LIBRARIES
+
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+ if(PACKAGE_FIND_VERSION_COUNT GREATER 0)
+ set(_glib_version_cmp ">=${PACKAGE_FIND_VERSION}")
+ endif()
+ pkg_check_modules(_pc_glib glib-2.0${_glib_version_cmp} gobject-2.0${_glib_version_cmp})
+ if(_pc_glib_FOUND)
+ set(GLIB_FOUND TRUE)
+ set(GLIB_CFLAGS "${_pc_glib_CFLAGS}")
+ set(GLIB_LIBRARIES "${_pc_glib_LIBRARIES}")
+ endif()
+endif()
+
+mark_as_advanced(
+ GLIB_CFLAGS
+ GLIB_LIBRARIES
+)
diff --git a/cmake/modules/FindLibXML.cmake b/cmake/modules/FindLibXML.cmake
new file mode 100644
index 00000000..00120ec3
--- /dev/null
+++ b/cmake/modules/FindLibXML.cmake
@@ -0,0 +1,25 @@
+# - try to find libxml
+#
+# Once done this will define
+#
+# LIBXML_FOUND - system has libxml
+# LIBXML_CFLAGS
+# LIBXML_LIBRARIES
+
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+ if(PACKAGE_FIND_VERSION_COUNT GREATER 0)
+ set(_libxml_version_cmp ">=${PACKAGE_FIND_VERSION}")
+ endif()
+ pkg_check_modules(_pc_libxml libxml-2.0${_libxml_version_cmp})
+ if(_pc_libxml_FOUND)
+ set(LIBXML_FOUND TRUE)
+ set(LIBXML_CFLAGS "${_pc_libxml_CFLAGS}")
+ set(LIBXML_LIBRARIES "${_pc_libxml_LIBRARIES}")
+ endif()
+endif()
+
+mark_as_advanced(
+ LIBXML_CFLAGS
+ LIBXML_LIBRARIES
+)
diff --git a/cmake/modules/GObjectIntrospectionMacros.cmake b/cmake/modules/GObjectIntrospectionMacros.cmake
index 419b0a6d..365bb00b 100644
--- a/cmake/modules/GObjectIntrospectionMacros.cmake
+++ b/cmake/modules/GObjectIntrospectionMacros.cmake
@@ -89,7 +89,7 @@ macro(gir_add_introspections introspections_girs)
endforeach()
- add_custom_target(gir-girs ALL DEPENDS ${_gir_girs})
- add_custom_target(gir-typelibs ALL DEPENDS ${_gir_typelibs})
+ add_custom_target(gir-girs-${_gir_name} ALL DEPENDS ${_gir_girs})
+ add_custom_target(gir-typelibs-${_gir_name} ALL DEPENDS ${_gir_typelibs})
endmacro(gir_add_introspections)