CMake: Make dll bundling optional
[xonotic/netradiant.git] / cmake / FindGLIB.cmake
index 8e231e9cf6f5f114e87966eb9c5b7a9dbc251ce6..092bdc863abb4f19fa0699674d91b0a8aef35f0f 100644 (file)
@@ -1,5 +1,9 @@
-include(FindPkgConfig OPTIONAL)
+include(FindPkgConfig)
 if (PKG_CONFIG_FOUND)
-    include(FindPkgConfig)
-    pkg_check_modules(GLIB glib-2.0)
+    if (GLIB_FIND_REQUIRED)
+        set(_PACKAGE_ARGS REQUIRED)
+    else ()
+        set(_PACKAGE_ARGS "")
+    endif ()
+    pkg_check_modules(GLIB glib-2.0 ${_PACKAGE_ARGS})
 endif ()