build: Do not build GLIB bindings with ENABLE_ASAN
@@ -3,9 +3,19 @@ include (LibAddMacros)
find_package (PkgConfig)
pkg_check_modules (GOBJECT gobject-2.0>=2.36)
+# Test if binding can be build
if (NOT GOBJECT_FOUND)
exclude_binding (glib "No gobject found using pkg-config, also remove gi bindings because they depend on it")
-else ()
+ return ()
+endif (NOT GOBJECT_FOUND)
+
+if (ENABLE_ASAN)
+ exclude_binding (glib "glib is not compatible with ENABLE_ASAN")
+ return ()
+endif (ENABLE_ASAN)
+
+
+# Add binding
add_binding (glib)
set (GELEKTRA_LIBRARY gelektra-${SO_VERSION}.0 CACHE INTERNAL "GELEKTRA_LIBRARY")
@@ -39,4 +49,3 @@ else ()
if (BUILD_TESTING)
add_subdirectory (tests)
endif (BUILD_TESTING)
-endif ()
