fix cmake regression introduced in bfe21aee

Before calling list(REMOVE_ITEM ...) check if the variable exists, if it
doesn't cmake throws an error.
This commit is contained in:
Rafael Kitover 2018-08-10 09:37:55 -07:00
parent bfe21aee3e
commit 6cbad61f36
1 changed files with 3 additions and 1 deletions

View File

@ -66,7 +66,9 @@ function(normalize_wx_paths)
endfunction()
macro(cleanup_wx_vars)
list(REMOVE_ITEM wxWidgets_CXX_FLAGS -fpermissive)
if(wxWidgets_CXX_FLAGS)
list(REMOVE_ITEM wxWidgets_CXX_FLAGS -fpermissive)
endif()
endmacro()
if(CMAKE_PREFIX_PATH)