mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
FindwxWidgets: Do not reset wxWidgets_LIB_DIR unnecessarily
Only reset it when `WX_ROOT_DIR` had a value. This change allows to set both `wxWidgets_LIB_DIR` and `wxWidgets_ROOT_DIR` at the same time when they where previously `-NOTFOUND`.
This commit is contained in:
@@ -468,10 +468,12 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
|
||||
# If wxWidgets_ROOT_DIR changed, clear lib dir.
|
||||
if(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
|
||||
if(NOT wxWidgets_LIB_DIR OR WX_ROOT_DIR)
|
||||
set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
|
||||
CACHE PATH "Cleared." FORCE)
|
||||
endif()
|
||||
set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR}
|
||||
CACHE INTERNAL "wxWidgets_ROOT_DIR")
|
||||
set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
|
||||
CACHE PATH "Cleared." FORCE)
|
||||
endif()
|
||||
|
||||
if(WX_ROOT_DIR)
|
||||
|
||||
Reference in New Issue
Block a user