CMake: Fix library order in wxMSW build

uuid should be linked before oleacc, otherwise it causes multiple definition of `IID_IAccessible' (with MinGW64 gcc).
To simplify even more, specify all required libraries in wxTOOLKIT_LIBRARIES, in the same order as in the makefiles.
Add uxtheme library, it is required since wxUxThemeEngine wrapper has been removed.
This commit is contained in:
Maarten Bent
2018-01-20 15:15:57 +01:00
parent fb8403a064
commit dc0d93cccc
2 changed files with 14 additions and 16 deletions

View File

@@ -58,21 +58,7 @@ endif()
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT) if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT}) wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif() endif()
if(WIN32) if(APPLE)
wx_lib_link_libraries(base PUBLIC
kernel32
user32
shell32
ole32
oleaut32
uuid
rpcrt4
advapi32
Shlwapi
version
uuid
)
elseif(APPLE)
wx_lib_link_libraries(base wx_lib_link_libraries(base
PRIVATE PRIVATE
"-framework Security" "-framework Security"

View File

@@ -68,13 +68,25 @@ endif()
if(WXMSW) if(WXMSW)
set(wxTOOLKIT_LIBRARIES set(wxTOOLKIT_LIBRARIES
kernel32
user32
gdi32 gdi32
comdlg32 comdlg32
winspool winspool
winmm
shell32 shell32
shlwapi
comctl32 comctl32
ole32
oleaut32
uuid
rpcrt4 rpcrt4
Oleacc advapi32
version
wsock32
wininet
oleacc
uxtheme
) )
elseif(WXGTK) elseif(WXGTK)
if(WXGTK3) if(WXGTK3)