unset(VAR PARENT_SCOPE CACHE FORCE) seemed to work on my version of cmake on gentoo, but does not work on other versions. Rewrite the function as a macro and use the syntax: unset(VAR CACHE) instead.
This commit is contained in:
parent
5644339193
commit
3b44a29948
|
@ -65,13 +65,13 @@ function(normalize_wx_paths)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
function(clear_wx_vars)
|
||||
unset(wxWidgets_FOUND PARENT_SCOPE CACHE FORCE)
|
||||
unset(wxWidgets_INCLUDE_DIRS PARENT_SCOPE CACHE FORCE)
|
||||
unset(wxWidgets_LIBRARIES PARENT_SCOPE CACHE FORCE)
|
||||
unset(wxWidgets_LIBRARY_DIRS PARENT_SCOPE CACHE FORCE)
|
||||
unset(wxWidgets_CXX_FLAGS PARENT_SCOPE CACHE FORCE)
|
||||
endfunction()
|
||||
macro(clear_wx_vars)
|
||||
unset(wxWidgets_FOUND CACHE)
|
||||
unset(wxWidgets_INCLUDE_DIRS CACHE)
|
||||
unset(wxWidgets_LIBRARIES CACHE)
|
||||
unset(wxWidgets_LIBRARY_DIRS CACHE)
|
||||
unset(wxWidgets_CXX_FLAGS CACHE)
|
||||
endmacro()
|
||||
|
||||
if(CMAKE_PREFIX_PATH)
|
||||
set(wxWidgets_CONFIG_OPTIONS "--prefix=${CMAKE_PREFIX_PATH}")
|
||||
|
|
Loading…
Reference in New Issue