IO GLib: Add workaround to fix compilation error
@@ -93,6 +93,17 @@ if (FOUND_NAME GREATER -1)
set (SRC_FILES notificationReload.c)
set (SOURCES ${SRC_FILES} ${HDR_FILES})
if (BUILD_FULL OR BUILD_STATIC)
+ # ~~~
+ # Work around an error that occurs if only `BUILD_FULL`, but not `BUILD_SHARED` is enabled:
+ #
+ # > src/include/kdbio/glib.h:11:10: fatal error: glib.h: No such file or directory
+ #
+ # . See also: https://travis-ci.org/sanssecours/elektra/jobs/445784708.
+ # ~~~
+ find_package (PkgConfig QUIET)
+ pkg_check_modules (GLIB QUIET glib-2.0)
+ include_directories (${GLIB_INCLUDE_DIRS})
+
list (APPEND SOURCES
$<TARGET_OBJECTS:OBJ_elektra-io-glib>) # add sources for elektra-io-uv for static and full builds
endif ()
