aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindGLIB2.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindGLIB2.cmake')
-rw-r--r--cmake/modules/FindGLIB2.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake
index 46bede9ec5..1882cfe411 100644
--- a/cmake/modules/FindGLIB2.cmake
+++ b/cmake/modules/FindGLIB2.cmake
@@ -99,7 +99,9 @@ elseif(GLIB2_INTERNAL_INCLUDE_DIR)
string(REGEX MATCH "[0-9]+" GLIB_MICRO_VERSION ${GLIB_MICRO_VERSION})
set(GLIB2_VERSION ${GLIB_MAJOR_VERSION}.${GLIB_MINOR_VERSION}.${GLIB_MICRO_VERSION})
else()
- set(GLIB2_VERSION "")
+ # When using VERSION_VAR it must be set to a valid value or undefined to
+ # mean "not found". It's not enough to use the empty string or any other CMake false boolean.
+ unset(GLIB2_VERSION)
endif()
include( FindPackageHandleStandardArgs )