CMake: Improve webview checks

Try to match behavior of configure.
Fix building webview sample with STC disabled.
This commit is contained in:
Maarten Bent
2018-12-03 00:20:38 +01:00
parent 8192d507e3
commit e984857b0e
4 changed files with 38 additions and 20 deletions

View File

@@ -152,7 +152,10 @@ wx_add_sample(typetest typetest.cpp typetest.h)
wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR)
wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS)
wx_add_sample(vscroll vstest.cpp)
wx_add_sample(webview LIBRARIES webview stc NAME webviewsample DEPENDS wxUSE_WEBVIEW)
wx_add_sample(webview LIBRARIES webview NAME webviewsample DEPENDS wxUSE_WEBVIEW)
if(TARGET webviewsample AND wxUSE_STC)
wx_exe_link_libraries(webviewsample stc)
endif()
# widgets Sample
set(SAMPLE_WIDGETS_SRC
activityindicator.cpp