Unset cached variables on failure in Jansson find module

This commit is contained in:
BtbN
2014-05-25 16:37:49 +02:00
parent 143882ee71
commit 602b048089

View File

@@ -59,5 +59,10 @@ else()
REQUIRED_VARS Jansson_LIB Jansson_INCLUDE_DIR
VERSION_VAR JANSSON_VERSION)
mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIB)
if(NOT JANSSON_FOUND)
unset(JANSSON_INCLUDE_DIRS CACHE)
unset(JANSSON_LIBRARIES CACHE)
endif()
endif()