CMake: fix building library with wxUSE_GUI 0
Actual toolkit should still be defined (e.g. WXMSW), before settings WXBASE. Move Windows libraries outide toolkit so they are always linked to.
This commit is contained in:
@@ -193,6 +193,33 @@ function(wx_set_target_properties target_name is_base)
|
||||
target_include_directories(${target_name}
|
||||
PUBLIC ${wxTOOLKIT_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if (WXMSW)
|
||||
set(WXMSW_LIBRARIES
|
||||
kernel32
|
||||
user32
|
||||
gdi32
|
||||
comdlg32
|
||||
winspool
|
||||
winmm
|
||||
shell32
|
||||
shlwapi
|
||||
comctl32
|
||||
ole32
|
||||
oleaut32
|
||||
uuid
|
||||
rpcrt4
|
||||
advapi32
|
||||
version
|
||||
wsock32
|
||||
wininet
|
||||
oleacc
|
||||
uxtheme
|
||||
)
|
||||
target_link_libraries(${target_name}
|
||||
PUBLIC ${WXMSW_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(wxTOOLKIT_LIBRARIES)
|
||||
target_link_libraries(${target_name}
|
||||
PUBLIC ${wxTOOLKIT_LIBRARIES})
|
||||
|
Reference in New Issue
Block a user