summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Bent <MaartenBent@users.noreply.github.com>2023-10-31 20:38:49 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-01 12:20:07 (GMT)
commit35d90784e9be0879a818d71bbc8d7ee1a9c5871a (patch)
tree210991bccf5473cbaf6914c55ee4d611b78a30b7
parentb3f974ac8463ec2b55e9c3512041c5c121cdf9c3 (diff)
downloadCMake-35d90784e9be0879a818d71bbc8d7ee1a9c5871a.zip
CMake-35d90784e9be0879a818d71bbc8d7ee1a9c5871a.tar.gz
CMake-35d90784e9be0879a818d71bbc8d7ee1a9c5871a.tar.bz2
FindwxWidgets: use IN_LIST
-rw-r--r--Modules/FindwxWidgets.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 78fa481..89ba725 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -188,6 +188,9 @@ macro(DBG_MSG_V _MSG)
# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
endmacro()
+cmake_policy(PUSH)
+cmake_policy(SET CMP0057 NEW) # if IN_LIST
+
# Clear return values in case the module is loaded more than once.
set(wxWidgets_FOUND FALSE)
set(wxWidgets_INCLUDE_DIRS "")
@@ -441,8 +444,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endif()
DBG_MSG_V("OpenGL")
- list(FIND ${_LIBS} gl WX_USE_GL)
- if(NOT WX_USE_GL EQUAL -1)
+ if(gl IN_LIST ${_LIBS})
DBG_MSG_V("- is required.")
list(APPEND wxWidgets_LIBRARIES opengl32 glu32)
endif()
@@ -1215,3 +1217,5 @@ function(WXWIDGETS_ADD_RESOURCES _outfiles)
set(${_outfiles} ${${_outfiles}} PARENT_SCOPE)
endfunction()
+
+cmake_policy(POP)