summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Bent <MaartenBent@users.noreply.github.com>2023-10-08 16:26:08 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-01 12:20:46 (GMT)
commit55072adf16231cc27befe4370d0ec261a59138c9 (patch)
treef489854aaac7b26bbab15375c6006e883acb9f92
parentc5e3d12213f7362a99e29d58b2cd01f613206e50 (diff)
downloadCMake-55072adf16231cc27befe4370d0ec261a59138c9.zip
CMake-55072adf16231cc27befe4370d0ec261a59138c9.tar.gz
CMake-55072adf16231cc27befe4370d0ec261a59138c9.tar.bz2
FindwxWidgets: Improve linking with scintilla
Treat scintilla like any other common lib. Only add it when the stc component is specified. Add imm32 to the list of required libraries when stc is used. Fixes: #23519
-rw-r--r--Modules/FindwxWidgets.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 82ae07f..933f14e 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -37,7 +37,7 @@ select a configuration):
wxWidgets_EXCLUDE_COMMON_LIBRARIES
- Set to TRUE to exclude linking of
commonly required libs (e.g., png tiff
- jpeg zlib regex expat).
+ jpeg zlib regex expat scintilla).
@@ -286,8 +286,10 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Add the common (usually required libs) unless
# wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set.
if(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
- list(APPEND wxWidgets_FIND_COMPONENTS
- ${wxWidgets_COMMON_LIBRARIES})
+ if(stc IN_LIST wxWidgets_FIND_COMPONENTS)
+ list(APPEND wxWidgets_FIND_COMPONENTS scintilla)
+ endif()
+ list(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES})
endif()
#-------------------------------------------------------------------
@@ -455,6 +457,10 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
list(APPEND wxWidgets_LIBRARIES opengl32 glu32)
endif()
+ if(stc IN_LIST ${_LIBS})
+ list(APPEND wxWidgets_LIBRARIES imm32)
+ endif()
+
list(APPEND wxWidgets_LIBRARIES winmm comctl32 uuid oleacc uxtheme rpcrt4 shlwapi version wsock32)
endmacro()