diff options
author | Maarten Bent <MaartenBent@users.noreply.github.com> | 2022-07-05 23:09:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-06 13:59:38 (GMT) |
commit | 7d6e01801d50d2960de3f5b269bf79951a48c42d (patch) | |
tree | ef9f852515967ce034bdbc74b3faa6decddb3b9e /Modules | |
parent | 6dce42b1718a4947bfeaded77a127e6672c46815 (diff) | |
download | CMake-7d6e01801d50d2960de3f5b269bf79951a48c42d.zip CMake-7d6e01801d50d2960de3f5b269bf79951a48c42d.tar.gz CMake-7d6e01801d50d2960de3f5b269bf79951a48c42d.tar.bz2 |
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`.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindwxWidgets.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 3b80b2d..19eba95 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -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) |